失效链接处理 |
SpringBoot项目如何实现热部署 PDF 下载
本站整理下载:
相关截图:
![]()
主要内容:
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>
4、搜索Registry
方法①:双击Shift搜索Registry
方法②:Ctrl+Shift+A + Registry
5、找到Compiler autoMake allow when app running
将Compiler autoMake allow when app running勾选上
6、配置项目启动加载方式
7、修改内容后Ctrl+S,立马见效
|