window下将spring boot-jar添加到服务中,实现自动启动

1、下载winsw:https://github.com/winsw/winsw/releases


window下将spring boot-jar添加到服务中,实现自动启动


2、把WinSW-x64 与spring boot编译的 jar文件放在同一个目录下

3、对WinSW-x64.exe进行重命名,同时新建一个xml配置文件,建议名称设置成一样的,如springboot_Server.exe和springboot_Server..xml

4、进行xml配置内容如下:


  springboot_Server
  springboot_Server
  this service run java spring boot jar site
	
  java
  -jar "%BASE%\web-1.0.jar"
 Automatic

5、安装服务

在exe所在目录执行springboot_Server.exe install ,springboot_Server名自己替换,如需要卸载输入springboot_Server.exe uninstall

6启动服务

win+r,输入services.msc,查找到自己刚安装的服务,右键启动

发表评论
留言与评论(共有 0 条评论) “”
   
验证码:

相关文章

推荐文章