1.pom.xml添加
<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>true</fork>
</configuration>
</plugin>
</plugins>
3.Ctrl+Shift+Alt+/选择“Registry”

4.勾上compiler.automake.allow.when.app.running 然后关闭

5.ok
本文详细介绍如何在Spring Boot项目中配置热部署,包括在pom.xml中添加spring-boot-devtools依赖,修改spring-boot-maven-plugin插件设置,以及IDEA中启用自动编译和热更新功能的具体步骤。
8490

被折叠的 条评论
为什么被折叠?



