记一次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