Open ss96766 opened 6 years ago
I'm not sure I understand your problem. Could you please be more specific?
If what you say is that a sec:authorize
attribute still appears in your executed template, my question would be: are you using Spring Boot? if not, there is no reason the SpringSecurity Dialect would have registered itself, so besides adding the dialect to the pom.xml
you'd need to add your dialect to the TemplateEngine
as explained in the documentation.
I have the same problem.And i'm using SpringBoot.I tried thymeleaf-extras-springsecurity4 and thymeleaf-extras-springsecurity3,but failed.I still could see the sec
element using F12 .it seemd that was not resovled by thymeleaf
@StupidPz me too
specify your spring boot version, please...
@Kingsearch @marccollin try to change the version.it should work.
<thymeleaf.version>3.0.8.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>
<thymeleaf-extras-springsecurity4.version>3.0.2.RELEASE</thymeleaf-extras-springsecurity4.version>
Worked for me with the versions specified by @StupidPz , thank you :). I've just changed the version of thymeleaf-layout-dialect.version to 2.3.0
I'm using Spring Boot Version 2.0.1.RELEASE
@StupidPz @dokle thanks!!
It took me a lot of time!
My properties:
I've introduced thymeleaf-extras-springsecurity4 in pom. html page namespace is also added http://www.thymeleaf.org/extras/spring-security. But why I did not log in, sec: authorize = "isAuthenticated ()" This can not be hidden