【问题标题】:Is there a way to reload Spring boot application without the need to rerun the application on STS?有没有办法重新加载 Spring Boot 应用程序而无需在 STS 上重新运行应用程序?
【发布时间】:2019-03-07 21:02:49
【问题描述】:

我正在使用 STS (Spring Tool Suite) 来构建 spring boot 应用程序。每次我对代码进行一些更改时,我都需要在浏览器上刷新应用程序页面之前停止并运行(重新运行)应用程序。如果有一种方法可以跟踪我所做的更改并在我保存更改时将其包含在运行包中,那将非常有帮助。

【问题讨论】:

    标签: spring spring-boot


    【解决方案1】:

    您可以在依赖项中使用spring-boot-devtools

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

    每当类路径中的文件发生更改时,使用 spring-boot-devtools 的应用程序都会导致应用程序重新启动。此功能的好处是大大减少了验证所做更改所需的时间。有关 springboot devtools 的更多详细信息,请访问here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-12-01
      • 2018-07-23
      • 2011-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-19
      相关资源
      最近更新 更多