学习笔记-热部署Devtools
-
Adding devtools to your project
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
-
adding plugin to your pom.xml
在pom.xml 添加plugin ,我的是父项目,放在了父项目的pom.xml里
<build> <finalName>你自己的工程名字</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <addResources>true</addResources> </configuration> </plugin> </plugins> </build>
-
Enabling automatic build
-
Update the value of
使用快捷键 ctrl+alt+shirt+/ 打开对话框
可以在yml文件配置
# 服务模块 Spring: devtools: restart: # 热部署开关 enabled: true
-
重启IDEA
本文仅作为自己笔记,不作为他人参考