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"
来源: http://www.bubuko.com/infodetail-3048462.html