How can I display the current logged in User with Spring Boot Thymeleaf?
问题 I am trying to display the details of the current user however I keep getting errors. I tried accessing the authenticated user from the template but that did not work as I was getting this error: Method getFirstName() cannot be found on org.springframework.security.core.userdetails.User type I was trying to get the information from a controller and then saving it in a string and passsing the string to a template but that wasn't working either. Here is my SecurityConfig class: @Configuration