IDEA热部署

1. 引入spring-devtools

在项目的pom.xml文件中,添加spring-devtools的依赖

1
2
3
4
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>

同时在其中的标签的内添加

1
2
3
4
5
6
7
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>

2. 设置idea

  • 在File => Settings => Build, Execution, Deployment => Compiler 中勾选Build Project automatically

x

  • 快捷键 ctrl + alt + shift + /,选择Registry,勾上Compiler autoMake allow when app running


本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!