spring-boot-devtools

2020-03-06  本文已影响0人  请叫我的全名cv工程师

Developer tools的使用

spring-boot-devtools默认情况下是阻止其使用缓存的。

引用

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
</dependency>

设置idea的配置

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

上一篇 下一篇

猜你喜欢

热点阅读