加入dev dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
启用自动build
Settings --> Build-Execution-Deployment --> Compiler
启用项
Build Project Automatically
启用compiler.automake.allow.when.app.running
ctrl+shift+A输入registry,
启用项
compiler.automake.allow.when.app.running