Spring boot installs as a service under WindowsSeptember 11, 2017 17:35:41Hits: 1357
Packaging projects
mvn clean package
Download the WINSW, put it E:\project down and rename it to MyApp.exe .
E:\projectunder Create a project.xml file, the content is as follows:
<Service><Id>myapp</Id><Name>myapp</Name><Description> Your application description</description> < env name= "MYAPP_HOME" value= "%base%"/> < executable>java</executable> <arguments>-xmx256m-jar "%base%\myapp.jar"-- Spring.profiles.active=prod</arguments> <logmode>rotate</logmode></SERVICE>
Put your packaged application file E:\project\bin down and name it MyApp.jar .
Configure the Windows environment variable to add a MYAPP_HOME value of E:\project\bin .
The structure of your file should look like this:
E盘 project MyApp.exe MyApp.xml bin MyApp.jar
At the end of the console, the execution MyApp.exe install may require you to install. NET components.
Spring boot installs as a service (GO) under Windows