Thymeleaf无法解析`sec:***`标签
Thymeleaf
和Spring Security整合
时, 发现sec:authorize="hasRole('ROOT')"
标签不能被解析,在pom中添加如下依赖即可:
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>
Env: springboot2 spring security5