2021
12-16
12-16
浅谈spring boot使用thymeleaf版本的问题
springboot使用thymeleaf版本问题Springboot默认使用的是thymeleaf的2版本,这个版本比较低,有些功能不支持,需要切换成3版本在properties中加入<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version><thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>thymeleaf在Maven的版本配置<properties><thymeleaf.version>3.0.11.RELEASE</thymeleaf.version><thymeleaf-layout-dialect.ver...
继续阅读 >
1.1准备 1.1.1创建SpringBoot项目 创建好一个空的SpringBoot项目之后,写一个controller验证此时是可以直接访问到该控制器的。1.1.2引入SpringSecurity 在SpringBoot中引入SpringSecurity是相当简单的,可以在用脚手架创建项目的时候勾选,也可以创建完毕后在pom文件中加入相关依赖。<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-star...