spring-boot项目(idea工具)热部署(亲测有效)

来源:互联网 发布:油菜花粉 知乎 编辑:程序博客网 时间:2024/06/08 11:15

spring-boot项目热部署idea工具:

(1)、pom文件引入:都需要为true

<!-- 热部署模块 --><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>

(2)、idea编译器设置file→setting→compiler


(3)idea设置

快捷键ctrl+alt+shift  /


勾选

重启项目即可生效。亲测有效。

原创粉丝点击