一、配置idea
a、Ctrl+Alt+S => Compiler => Build project automatically;
b、Ctrl+Alt+Shift+/ => Registry... => compiler.automake.allow.when.app.running;
二、配置pom
<!-- 加入以下依赖,代码作了修改,不用重新运行 --> <dependency> <groupId>org.springframework</groupId> <artifactId>springloaded</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> </dependency>