Springboot项目热部署的几种方式
1、添加依赖
//gradle热部署
compile ('org.springframework.boot:spring-boot-devtools')
//Maven热部署
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2、IDEA自动编译设置
1、设置File ->Setting ->Compile:
2、快捷键ctrl + shift + a 搜索命令:registry 勾选compiler.automake.allow.when.app.running
3、修改默认build
1、点击Edit Configurations…
2、选择Update classes and resources 或者Update resources,选中默认的Build,删除,点击+号选择Build Artifacts
3、如果没有Build Artifacts,设置File ->Project Structure->Artifacts ,点击+添加