springboot熱加載

基於IDEA的熱加載。spring

在pom.xml中添加相應的依賴maven

<!-- 熱加載-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
    <!--<scope>true</scope>-->
</dependency>

在pom.xml中添加相應的插件spring-boot

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <fork>true</fork><!-- 若是沒有該配置,熱部署的devtools不生效 -->
 </configuration>
</plugin>

設置IDEAspa

image.png

ctrl+shit+alt+/ 快捷鍵並點擊Registry
mac快捷鍵 command+shit+option+/ 快捷鍵並點擊Registry插件

image.png

找到以下圖對應的Key並勾選code

image.png

按照如上所述步驟便可開啓IDEA開發spring熱加載功能。xml

相關文章
相關標籤/搜索