1.pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2.application.yml
spring:
devtools:
restart:
enabled: true
additional-paths: src/main/java
3.File -> Settings -> Compiler -> Build project automatically
4. 打开registry ctrl + alt +shift + /
compiler.automake.allow.when.app.running
5. restart idea.
本文详细介绍如何在Spring Boot项目中配置热部署功能,通过修改pom.xml引入spring-boot-devtools依赖,设置application.yml文件启用devtools重启模块,并配置IDEA进行自动编译,最后介绍如何在IDEA中开启应用运行时的自动编译功能。
3702

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



