在SpringBootStarter中无法识别Thymeleaf SEC标记

问题描述 投票:1回答:1

我有两个项目,一个是我的,另一个是书的例子。

两个项目都使用Gradle,在我的项目中,sec标签无法识别。一切都完全相同,除了:

我的项目(在build.gradle中)使用:

  1. springBootVersion ='1.3.0.RELEASE'
  2. gradleVersion ='2.7'
  3. compile('org.thymeleaf.extras:thymeleaf-extras-springsecurity3:2.1.2.RELEASE')

下载的项目(安全标记的工作原理)使用:

  1. springBootVersion ='1.2.5.RELEASE'
  2. gradleVersion ='2.3'
  3. 共聚物;三甲基琥珀酸;三甲基硅氧烷;

在这两个页面中我都定义了sec:namespace:

xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
spring-boot thymeleaf
1个回答
0
投票

thymeleaf springsecurity3和springsecurity4的命名空间是相同的:

xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
© www.soinside.com 2019 - 2024. All rights reserved.