简体   繁体   English

如何在STS内置服务器上重新部署Spring Boot应用程序

[英]How to redeploy spring boot application on STS built-in server

I have a Spring Boot Gradle application with apply plugin: 'war' . 我有一个带有apply plugin: 'war'的Spring Boot Gradle应用程序。 I run the application on STS by right click > Run As > Spring Boot App . 我通过right click > Run As > Spring Boot App在STS上运行该应用right click > Run As > Spring Boot App It runs fine. 运行正常。 Now I make a change to the code and I want to redeploy (and better automatically). 现在,我对代码进行了更改,我想重新部署(最好是自动重新部署)。 The only way I know now is to stop the server and run again. 我现在知道的唯一方法是停止服务器并再次运行。 Is there any faster solution? 有没有更快的解决方案?

Spring-boot provide something called devtools which is a very neat feature. Spring-boot提供了一个叫做devtools东西,这是一个非常简洁的功能。

Include this starter on your gradle build 在您的Gradle版本中包含此启动程序

compile("org.springframework.boot:spring-boot-devtools")

This will automatically restart whenever files on the classpath changes. 每当类路径上的文件更改时,它将自动重新启动。 So you don't have to manually stop and start server. 因此,您不必手动停止和启动服务器。

you can see more details here . 您可以在此处查看更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用STS运行Spring Boot应用程序 - How to run Spring boot application with STS 在docker容器中重新部署spring-boot应用程序? - Redeploy spring-boot application in docker container? STS-Spring Boot应用程序-请求的资源不可用 - STS - Spring Boot Application - The requested resource is not available 将应用程序部署到 tomcat 服务器时,Spring-boot 的内置记录器出现问题 - Having an issue with Spring-boot's built-in logger when deploying app to tomcat server 如何使用在典型的Spring应用程序中基于Spring引导构建的依赖项? - How to work with a dependency that is built on Spring boot into typical spring application? 调试在 STS(Spring Tool Suite)中的 Spring Boot 2.7.3 应用程序上不起作用 - Debug not working on Spring Boot 2.7.3 application in STS (Spring Tool Suite) Spring Boot 应用程序在 STS 中工作但无法使用 java -jar 启动 - Spring boot application works in STS but fails to start with java -jar Spring Boot Actuator 不工作并且 application.properties 在 STS 中是未知的 - Spring Boot Actuator not working and application.properties are Unknown in STS 在 STS 中运行 Spring Boot 应用程序时找不到 Bean - Bean could not be found when running Spring Boot application in STS 如何在 spring sts 中获取 spring 引导 web 项目的默认结构? - How to get default structure of spring boot web project in spring sts?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM