把spring boot发布成window Service

一:下载Winsw, 把下载后的文件名改为你的应用如doctor.exe

二:添加xml

<service>
    <id>doctor-api-service</id>
    <name>doctor api service</name>
    <description>doctor pc article api service</description>
    <executable>java</executable>
    <arguments>-Xmx256m -jar "doctor-web-1.0.jar"</arguments>
    <logmode>rotate</logmode>
</service>

三:安装服务

doctor.exe install

这是我能找到最快速的方法

猜你喜欢

转载自www.cnblogs.com/season2009/p/9186130.html