springboot实现热部署,修改代码不用重启服务

一、引入热部署依赖spring

<!-- 热部署模块 -->
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-devtools</artifactId>
   <optional>true</optional> <!-- 这个须要为 true 热部署才有效 -->
</dependency>

<plugin>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-maven-plugin</artifactId>
   <configuration>
      <fork>true</fork>
   </configuration>
</plugin>

二、修改IDEA开发工具配置maven

ctrl+shift+alt+/ :spring-boot

 

相关文章
相关标签/搜索