Developer tools的使用
spring-boot-devtools默認情況下是阻止其使用緩存的。
引用
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
設置idea的配置
-
1.alt+ctrl+s 打開設置界面
image.png -
ctrl+ shift+a 搜索registry
image.png
-

image.png
禁用重啟
再啟動類中增加一行代碼
public static void main(String[] args) {
System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(MyApp.class, args);
}
大功告成
參看文獻
1.https://blog.csdn.net/strong_yu/article/details/77563446

