springboot+freemarker 在idea中实现热部署

1.在pom文件中添加

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
2.设置spring.freeemarker.cache=false
3.file--setting

4.hepl--find action 输入Registry...  设置compiler.automake.allow.when.app.running

5.重启idea
完成上面的步骤就可以方便使用啦,不用每次修改个东西都要重启程序了
原文地址:https://www.cnblogs.com/hujia/p/8805068.html