为什么要引入thymeleaf
SpringBoot以jar包的方式进行打包,使用的是内嵌的tomcat,jsp只能作为静态资源 所以可以使用html,结合模板引擎。 SpringBoot推荐Thymeleaf。
导入Thymeleaf
从starters入口进入
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>