Spring boot installs as a service (GO) under Windows

Source: Internet
Author: User

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>     
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

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
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.