springboot jar包 一键部署,开机自动启动

文件放置情况:

文件放置情况:

下载链接:

https://download.csdn.net/download/qq_21246715/13133608

jdk1.8.0_144:jdk文件夹

demo.jar:springboot打包的jar

vis-start.exe:winsw文件

vis-start.xml:winsw配置

vis-start-install.cmd:将jar添加服务,并启动

vis-start-uninstall.cmd: 将服务停止,并删除服务

打不开安装这个.exe:winsw需要依赖.net4,如电脑没安装.net,请先安装改程序

 

Vis-start.xml配置

<configuration>

  <!-- 系统服务ID,不能与其他系统服务名称重复-->

  <id>vis-springBootJar</id>

  <!-- 系统服务显示名称 -->

  <name>vis-springBootJar</name>

  <!-- 服务描述 -->

  <description>springBootJar Service</description>

  <!-- java路径 -->

  <executable>%BASE%/jdk1.8.0_144/bin/java.exe</executable>  

  <!-- 命令参数,分行可以用多行'argument'标记 -->

  <arguments>-jar %BASE%\demo.jar</arguments>

  <!-- 日志 -->

  <logpath>%BASE%\logs</logpath>

</configuration>

执行命令:

启动服务双击:vis-start-install.cmd

编辑vis-start-install.cmd

%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
cd /d "%~dp0"
vis-start.exe install
vis-start.exe start

检测:

 

 

停服务请使用:vis-start-uninstall.cmd

编辑vis-start-uninstall.cmd

%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
cd /d "%~dp0"
vis-start.exe stop
vis-start.exe uninstall

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值