背景:近期开发java应用由eclipse转移到IDEA,也是受周围人的影响,本来使用eclipse感觉也不错,索性为了方便开发协作,也试试使用IDEA
问题:开发调试过程中,修改java代码或者html模板文件需要重启才生效
方案1:配置devtools插件,这种方法依赖过重,故不采用。具体方法:
https://blog.csdn.net/liushuiziyouliu/article/details/79043380
方案2:不需要devtools插件,配置“on 'Update' action”
Edit Configurations -> configuration

详细配置1
接下来配置‘compiler.automake.allow.when.app.running’
Help -> Find action

配置详情2
然后配置IDEA的自动编译
preferences -> Build,Execution,Deployment -> Compiler

配置详情3
最后在application.yml中配置spring.thymeleaf.cache=false (如果不配置,默认次选项是true)
作者:way789
链接:https://www.jianshu.com/p/5e2050bcd38c
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
后记:
(1) spring.thymeleaf.cache=false 这个一定要
(2) preferences -> Build,Execution,Deployment -> Compiler 这个要做;
(3) compiler.automake.allow.when.app.running 这个要做,调用这个配置的快捷键是