1、application.properties文件中关闭缓存spring.thymeleaf.cache=fasle

2、设置项目自动编译

配置好上面两步后,项目还是不能自动进行热部署或自动编译,原因maven未对项目进行编译到target相应的目录中。则进行操作第三步骤。
3、Ctrl+Shift+Alt+/ 选择Registry,勾选compiler.automake.allow.when.app.running

本文介绍如何通过修改application.properties文件中的spring.thymeleaf.cache属性来禁用Thymeleaf模板引擎的缓存功能,并通过IDEA设置使Maven项目能在运行时自动进行编译,确保开发过程中的改动能够即时生效。
1、application.properties文件中关闭缓存spring.thymeleaf.cache=fasle

2、设置项目自动编译

配置好上面两步后,项目还是不能自动进行热部署或自动编译,原因maven未对项目进行编译到target相应的目录中。则进行操作第三步骤。
3、Ctrl+Shift+Alt+/ 选择Registry,勾选compiler.automake.allow.when.app.running

1998
404

被折叠的 条评论
为什么被折叠?