#关闭默认的thymleaf:
spring.thymeleaf.cache=false
这样,再用Update classes and resources方式更新就能更新静态文件了.
2.修改pom.xm
l,在dependency那里引入热部署devtools的maven引用
===========================================================================================================
设置如下:
org.springframework.boot
spring-boot-devtools
true
true
org.springframework.boot
spring-boot-maven-plugin
true
3.在setting里面找到Build,Execution,Deployment->Compiler下将Build project ayutomaticaly开启
==============================================================================================================================================
如下图所示;
4.Mac用户同时按下 shitf+option+command+/ ,windows用户的话,大概是 shift+ctrl+alt+/找到Registy,勾选compiler.automake.allow.when.app.running
=====================================================================================================================================================================================
如下图示:
5.接下来在application.properties中开启devtool:
====================================================================================================