[英]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. 因此,您不必手动停止和启动服务器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.