SpringBoot热部署:修改了代码后可以不用重新运行就能生效:
1. 在<dependencies>下添加一个dependency:
<dependencies>
........
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>
....
</dependencies>
2.在build模块中添加配置:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- 要添加该配置后,devTools热部署才能生效-->
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>