1. 程式人生 > >idea springBoot 配置devtools實現熱部署

idea springBoot 配置devtools實現熱部署

實現 nbsp 測試 輸入a uil cal build 依賴 修改

1、pom文件依賴引入

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId
>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <
scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration
> <fork>true</fork><!-- 如果沒有該配置,devtools不會生效 --> </configuration> </plugin> </plugins> </build>

2、IDEA配置

ctrl + shift + A,輸入automatically,選擇如圖所示點擊進入

技術分享圖片

技術分享圖片

然後ctrl + shift + alt + /,選擇如下圖所示點擊進入

技術分享圖片

技術分享圖片

保存重啟,之後修改文件進行測試即可

idea springBoot 配置devtools實現熱部署