Background run configuration for Spring boot app
sort out some of the ways that spring boot background runs. Before we introduce the background run configuration, let's review some of the ways that the spring Boot app works:
-
Run the Spring boot application main class
-
Use MAVEN's spring boot plugin MVN Spring-boot:run
to run
-
into a jar package, use java-jar
run
When we develop, we usually use the first two, but we often use a third when we deploy. However, we are Java -jar
not running in the background when we use it to run. Let's take a look at the windows and Linux/unix two environments and how to configure how the background runs.
Windows
Windows is simple, we can directly use this software: AlwaysUp
. As shown, simple, violent, and useful.
650) this.width=650; "src=" Http://blog.didispace.com/assets/alwaysup-1.png "style=" Border:none;margin:auto; Padding:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;height:auto; "/ >
The configuration is simple and we just need to get the spring boot app throughmvn install
Make a jar package, and then write ajava -jar yourapp.jar
The bat file. Open it again.AlwaysUp
, click the first button on the toolbar, as shown, select the bat file you wrote above and fill in the service name.
650) this.width=650; "src=" Http://blog.didispace.com/assets/alwaysup-2.png "style=" Border:none;margin:auto; Padding:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;height:auto; "/ >
Once created, you can see the services we have configured in the list, and you can start the app in the background by right-clicking the selection Start xxx
.
This article from "10,000 years too long, seize" blog, please be sure to keep this source http://zengwj1949.blog.51cto.com/10747365/1944648
Windows program background Run