1

I really new in Spring Boot and Thymeleaf and I working on a sample project which is implementing Spring Security. And I also want to use Thymeleaf Security Dialect for my project. As I read there is no need to create a configration for Security Dialect in case of Spring Boot. First what I want to achieve is to show the logged in user in the view. What I have done so far:

I added this div to view:

    <div sec:authentication="name">
        The value of the "name" property of the authentication object should appear here.
    </div>

And added a dependecy to pom.xml:

<!-- https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity4 -->
<dependency>
    <groupId>org.thymeleaf.extras</groupId>
    <artifactId>thymeleaf-extras-springsecurity4</artifactId>
    <version>3.0.0.RELEASE</version>
</dependency>

If anybody has any idea please let me know.

1 Answer 1

1

I solved this issue, or I found a solution. The problem is that I used a 3.0.0.RELEASE version of thymeleaf-extras-springsecurity4. With 2.1.2.RELEASE works fine.

1
  • In spring boot, you don't have to specify the version of thymeleaf-extras-springsecurity4, any update if you don't specify the version?
    – iamcoming
    Commented Aug 31, 2018 at 0:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.