1.添加pom依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork>//该配置必须 </configuration> </plugin> </plugins> </build> 2.代码修改后,在项目上点击“Build Module xxxx”