1.在pom.xml中添加依赖和插件
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 这个需要为 true 热部署才有效 -->
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
2.项目自动编译
菜单 -> Other Settings -> Default Settings -> Builld, Execution, Deployment -> Compiler 勾选其中的 Build project automatically
3.automake 选项开启
按ctrl+shift+alt+/,组合键,选择Registry,勾选compiler.automake.allow.when.app.running