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

僅適用IDEA中,eclipse中不須要設置spring

1、開啓idea自動make功能 app


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  



兩步: 
一、CTRL + SHIFT + A --> 查找make project automatically --> 選中 
二、CTRL + SHIFT + A --> 查找Registry --> 找到並勾選compiler.automake.allow.when.app.running eclipse

 

固然了,要在pom.xml中添加上 spring開發工具包ide

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional> <!-- 這個須要爲 true 熱部署纔有效 -->
            <scope>runtime</scope>
        </dependency>

 

在IDEA中開啓自動編譯:spring-boot

相關文章
相關標籤/搜索