gradle+springboot中 thymeleaf 配合 Spring Security 权限判断时,出现Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "#authentication,取不到值时 是引入thymeleaf 的版本和 Thymeleaf extras版本不匹配的原因
 
我的解决办法是保持一致就正常了 //引入thymeleaf implementation ‘org.springframework.boot:spring-boot-starter-thymeleaf’ // 添加 Thymeleaf Spring Security 依赖,与 Thymeleaf 版本一致都是 3.x implementation ‘org.thymeleaf.extras:thymeleaf-extras-springsecurity5:3.0.4.RELEASE’