简易操作-Springboot实现热部署

实现步骤:

1.在pom.xml中添加dependence和plugins

2.在IDEA中设置settings开启自动编译

3.在IDEA中修改Registry

1.在pom.xml中添加dependence和plugins

1 <!--热部署-->
2 <dependency>
3     <groupId>org.springframework.boot</groupId>
4     <artifactId>spring-boot-devtools</artifactId>
5     <optional>true</optional>
6 </dependency>
1 <plugin>                                 
2     <groupId>org.springframework.boot</groupId>
3     <artifactId>spring-boot-maven-plugin</artifactId>
4     <configuration>
5         <fork>true</fork><!--注意要修改这里-->
6     </configuration>
7 </plugin>    

2.在IDEA中设置settings开启自动编译

3.在IDEA中修改Registry

使用 ctrl+shift+a 快捷键搜索 Registry,点击进入,找到compiler.automake.allow.when.app.running,勾上开启此功能即可。

猜你喜欢

转载自www.cnblogs.com/leirocks/p/9075204.html