-
Notifications
You must be signed in to change notification settings - Fork 141
Hot Swapping
gexiangdong edited this page Aug 18, 2018
·
3 revisions
POM文件中加入spring-boot-devtoools的依赖,可以在修改后自动重启,方便开发过程中测试。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>需要IDE工具打开自动编译,因为devtools是监视class文件的修改后自动重启,不是监视src目录下的java文件。
如果需要配置devtools,可以通过在application.yml里加入
spring:
devtools:
restart:
enabled: true
# 还有其他一些属性可配置,请参考文档