美文网首页
spring-boot-devtools

spring-boot-devtools

作者: 请叫我的全名cv工程师 | 来源:发表于2020-03-06 00:31 被阅读0次

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
    1. 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

相关文章

网友评论

      本文标题:spring-boot-devtools

      本文链接:https://www.haomeiwen.com/subject/vwjjrhtx.html