How to display current logged-in user's information in all templates including view managed by WebMvcConfigurerAdapter in Spring Security application

前端 未结 8 1910
眼角桃花
眼角桃花 2020-12-14 13:02

I have a Spring Boot application that uses Spring Security and Thymeleaf template. I am trying to display the logged-in user\'s first name and last name in a template when t

8条回答
  •  攒了一身酷
    2020-12-14 14:01

    For me, When using Spring boot 2.1.2 I need to use the following

     
    

    With thymeleaf-extras-springsecurity5

提交回复
热议问题