Skip to content

Hot Swapping

gexiangdong edited this page Apr 21, 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文件。

Clone this wiki locally