今天嘗試熱部署,沒想到弄了半天沒反應,最后經查閱發現此問題,希望同樣問題的這個沒配置的去添加試下,希望能幫到你
第一步pom文件引入坐標
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
第二步在pom文件增加下面配置
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork><!--必須添加這個配置-->
</configuration>
</plugin>
</plugins>
</build>
第三步
idea里面要設置
1、在IDEA中開啟自動編譯

2、Shift+Ctrl+Alt+/,選擇Registry
選 compiler.automake.allow.when.app.running
重啟項目就可以了
