添加依赖:pom.xml
1
2
3
4
5
|
<
dependency
>
<
groupId
>org.springframework.boot</
groupId
>
<
artifactId
>spring-boot-devtools</
artifactId
>
<
scope
>runtime</
scope
>
</
dependency
>
|
在eclipse下此时就可以了,但是在idea下却无效果,解决如下:pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
|
<
build
>
<
plugins
>
<
plugin
>
<
groupId
>org.springframework.boot</
groupId
>
<
artifactId
>spring-boot-maven-plugin</
artifactId
>
<!--开启热部署-->
<
configuration
>
<
fork
>true</
fork
>
</
configuration
>
</
plugin
>
</
plugins
>
</
build
>
|
我爱大金子