1.添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2.
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
3.开启工具的自动编译
myeclipse中自动开启,但idea中需要点击setting>compiler>
4.开启run…auto
1.Shift+Ctrl+Alt+/,选择Registry
如果是mac的话 快捷键是 command + shift + A
2.勾选有个
如果到此处还未生效,tomcat用户
需要在On ‘Update’ action和On frame deacttivation中选则 Update classes and resources