spring boot热部署

最近在学习spring boot,配置热部署的时候遇到问题,已解决,记录一下以免之后又忘记了。

在pom.xml中配置如下信息

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>


<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>




发现热部署并不成功,遂在网上找了下解决方法
  1. setting –> compiler
    将 Build project automatically 勾选上
  2. alt + shift + a 搜索 registry 选第一个,弹出框后下拉找到 compiler.automake.allow.when.app.running 勾选上即可。
原文地址:https://www.cnblogs.com/jinqi520/p/9579990.html