Thymeleaf 3.0 Spring Boot + Security integration does not work

前端 未结 3 735
执念已碎
执念已碎 2021-01-18 13:19

I struggle to get Thymeleaf to work with Spring Security in my Spring Boot 1.4.3 based project.

Tags like e.g.

3条回答
  •  心在旅途
    2021-01-18 13:38

    I used to have the same problem. Thymeleaf SpringSecurity only works with versions 3.x.x of thymeleaf, and the version that's shipped with Spring-boot is something like 2.x.x atm.

    Looking up how to add v3.x.x to my project brought me to the following documentation page: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-use-thymeleaf-3

    So you just need to add your dependencies, and then add the following in your properties to override the default version of thymeleaf to your dependencies:

    3.0.2.RELEASE
    2.1.1
    

提交回复
热议问题