Spring boot SpringBootStarter中未识别Thymeleaf SEC标记

Spring boot SpringBootStarter中未识别Thymeleaf SEC标记,spring-boot,thymeleaf,Spring Boot,Thymeleaf,我有两个项目,一个是我的,另一个是书的例子 无法识别project use Gradle和my project中的sec标记。 除以下情况外,一切都是完全平等的: 我的项目(in build.gradle)使用: springBootVersion='1.3.0.RELEASE' gradleVersion='2.7' compile('org.thymeleaf.extras:thymeleaf-extras-springsecurity3:2.1.2.RELEASE') 下载的项目(安全标记

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

无法识别project use Gradle和my project中的
sec
标记。 除以下情况外,一切都是完全平等的:

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

  • springBootVersion='1.3.0.RELEASE'
  • gradleVersion='2.7'
  • compile('org.thymeleaf.extras:thymeleaf-extras-springsecurity3:2.1.2.RELEASE')
  • 下载的项目(安全标记工作的地方)使用:

  • springBootVersion='1.2.5.RELEASE'
  • gradleVersion='2.3'
  • 编译“org.thymeleaf.extras:thymeleaf-extras-springsecurity3”
  • 在这两个页面中,我都定义了sec:命名空间:

    xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
    

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

    xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
    

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

    xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
    

    升级到
    springsecurity4
    标记,因为这是较新的Spring引导使用的。升级到
    springsecurity4
    标记,因为这是较新的Spring引导使用的。