Idea中Springboot熱部署無效解決方法
阿新 • • 發佈:2018-09-08
oot depend dev mat project bsp end 找到 pen
1 - Enable Automake from the compiler
PRESS: CTRL + SHIFT + A
TYPE: make project automatically
PRESS: Enter
Enable Make Project automatically feature
2 - Enable Automake when the application is running
PRESS: CTRL + SHIFT + A
TYPE: Registry
Find the key compiler.automake.allow.when.app.running and enable it
Note: Restart your application now
僅適用IDEA中,eclipse中不需要設置
一、開啟idea自動make功能
1 - Enable Automake from the compiler
PRESS: CTRL + SHIFT + A
TYPE: make project automatically
PRESS: Enter
Enable Make Project automatically feature
2 - Enable Automake when the application is running
PRESS: CTRL + SHIFT + A
TYPE: Registry
Find the key compiler.automake.allow.when.app.running and enable it
Note: Restart your application now
兩步:
1、CTRL + SHIFT + A --> 查找make project automatically --> 選中
2、CTRL + SHIFT + A --> 查找Registry --> 找到並勾選compiler.automake.allow.when.app.running
當然了,要在pom.xml中添加上 spring開發工具包
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <!-- 這個需要為 true 熱部署才有效 --> <scope>runtime</scope> </dependency>
在IDEA中開啟自動編譯:
Idea中Springboot熱部署無效解決方法