1.参照下面图片中标红的步骤
2.经过步骤1就拿到了每个版本最新的资料了。
3.这里以集成thymleaf为例
4.找到pom依赖,springboot内置了thymleaf,引入依赖即可使用,把静态页面放到template包下,通过controller访问
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
</dependency>
5.此时在template包下新建html文件,并在顶部加上约束,
<html xmlns:th="http://www.thymeleaf.org">这里选择3.0的原因是springboot2.2这个版本引入的就是thymeleaf3.0,具体看点进pom的
parent的顶层
artifactId
的
dependencyManagement依赖管理中查看。
6.按照官网的文档进行thymeleaf语法学习