Intellij idea +spring boot 工程热部署
Debug调试模式启动程序,工程热部署。
1.application.properties中添加配置
#debug调试模式,工程热部署
spring.thymeleaf.cache=false
2.pom.xml中添加配置
<!-- 工程热部署 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
在plugin的配置中添加
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- 工程热部署 -->
<configuration>
<fork>true</fork>
</configuration>
</plugin>
4.设置Intellij idea,
File->setting->Build->Compiler,勾选图中红色框选项
5.设置
ctrl+shift+A
输入Registry

选择后弹窗

图中蓝色字体项,打勾,即可。
若工程此时是调试模式,才会将此栏变成蓝色字体并置顶。
若工程未运行,则不是蓝色字体也不置顶。
浙公网安备 33010602011771号