Springboot在IDEA中執行,開啟熱部署


僅適用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中開啟自動編譯:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM