在配置中加入
spring:
thymeleaf:
cache: false
application.properties则为
spring.thymeleaf.cache=false
修改java后,classes中的html文件自动刷新了,点击页面显示新的信息。
StringBoot,官方推荐thymeleaf模板引擎渲染页面,做到页面和数据分离的效果, 不用jsp了
需要加载依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>