Spring Boot配置静态资源不重启即时生效
在项目中,用到了模板引擎,每次修改一个 html,要重启才生效,配置不重启也实时生效,可以提供开发效率
在pom
中直接引入依赖spring-boot-devtools
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
在 automatically.properties
中 开启application.properties
开启页面热价值
#页面热加载
spring.thymeleaf.cache = true
点击File
-> Settings
-> Build-Execution-Deplyment
-> Compiler
,选中打勾 Build project
