idea 開啟熱部署(SpringBoot)
阿新 • • 發佈:2019-01-29
僅適用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中開啟自動編譯: