SpringBoot 项目实现热启动

https://blog.csdn.net/fengqing5578/article/details/127316742 

 

1.引入依赖。在pom.xml 文件 <dependencies></ dependencies> 添加如下内容

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


2.引入插件。在pom.xml 文件 <plugins></ plugins> 添加如下内容
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--如果没有fork配置,devtools不起作用,即项目修改后不会重新启动 -->
<fork>true</fork>
</configuration>
</plugin>


3.修改配置。打开settings。File=>settings 

 

 

4.组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running”

 

 

 

 

posted @ 2023-07-11 17:46  kelelipeng  阅读(204)  评论(0编辑  收藏  举报