解決問題:改代碼後手動重啓的煩惱。
熱部署Devtools
1.Adding devtools to your project(pom文件添加devtools依賴jar包)
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2.Adding plugin to your pom.xml(添加插件到pom文件中)
下一段配置黏貼到父工程當中的pom裏
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
3.Enabling automatic build(開啓自動編譯權限)
4.Update the value of (更新值)
快捷鍵 :ctrl+shift+alt+/ 然後彈出如下圖彈框: