热部署开发工具–Spring-boot-devtools
spring-boot-devtools热部署开发工具,提高开发者工作效率。以下内容仅是个人实测,如有问题请指正。
pom文件
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--热部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<!--optional标签的作用是在打包时不将当前jar打到包中-->
<optional>true</optional>
</dependency>
</dependencies>
IntelliJ IDEA 配置
1、File-Seting-Build,Execution,Deployment --Compile
2.Crtl+Shift+Alt+/
3.在Registry页面找到 compiler.automake.allow.when.app.running 勾选上。当前修改代码后会自动启动