原博客出处:http://blog.csdn.net/wjc475869/article/details/52442484
首先加配置,这里一般没问题
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
之后修改IDEA的配置
第一、这里打勾
第二,Shift+Ctrl+Alt+/,选择Registry
第三
最后重启项目,ok了。