SpringBoot项目如何实现热部署
1、在pom文件中添加spring-boot-devtools依赖
2、pom文件中添加配置
3、修改环境变量
4、搜索Registry
5、找到Compiler autoMake allow when app running
6、配置项目启动加载方式
7、修改内容后Ctrl+S,立马见效
SpringBoot项目如何实现热部署
1、在pom文件中添加spring-boot-devtools依赖
2、pom文件中添加配置
3、修改环境变量
将Build project automatically勾选上
<!--热部署工具-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>2.1.10.RELEASE</version>
<!-- optional=true,依赖不会传递-->
<!-- 本项目依赖devtools;若依赖本项目的其他项目想要使用devtools,需要重新引入
-->
<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>
评论0
最新资源