IDEA 下 SpringBoot 实现热部署

Step1: 按照下图所示,勾选Build project automatically:

Step2: 快捷键ctrl + shift + A,搜索Registry,选择第一个,如下图所示:

勾选下图中compiler.automake.allow.when.app.running,然后点击关闭。

Step3: 重启IDEA

Step4: 在项目中引入spring-boot-devtools依赖,即可:

1
2
3
4
5
6
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×