記一次SpringBoot熱更新配置


1. pom.xml

<dependency>
	<groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
    <scope>true</scope>
</dependency>
<plugin>
    <!--熱部署配置-->
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
    	<fork>true</fork>
    </configuration>
</plugin>

2. idea配置

File -> Settings -> Compiler 勾選 √ Build Project automatically

3. Registry

  • ctrl + shift + alt + /
  • 選擇Registry
  • √ Compiler autoMake allow when app running

使用效果:

檢測到更新會自動重啟服務,但是使用起來感覺並不是很便捷


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM