1,首先在POM文件中引入模板引擎的jar包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
2,在application.properties中配置模板引擎
3.controller层
然后访问本地主机:8080 /索引
好
1,首先在POM文件中引入模板引擎的jar包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
2,在application.properties中配置模板引擎
3.controller层
然后访问本地主机:8080 /索引
好