将springboot安装成windows服务启动。

本文下载了winsw-2.3.0-bin.exe。
新建一个目录aiplatformService
在目录里面新建一个aiplatformService.xml,同时把winsw-2.3.0-bin.exe重命名陈aiplatformService.exe
必须这么做,否则无法安装启动服务。
编辑aiplatfomService.xml文件
<?xml version="1.0" encoding="utf-8" ?>
<service>
<id>aiPlat</id> <!-- must be unique -->
<name>ai Platfrom Daemon</name>
<description>ai平台演示程序</description>
<executable>javaw</executable>
<arguments>-jar "%BASE%\web-0.2.jar"</arguments>
<logpath>%BASE%\log</logpath>
<log mode="roll-by-time">
<pattern>yyyy-MM-dd</pattern>
</log>
</service>
在目录中放入你的springboot项目,web-0.2.jar
在命令行 运行
安装服务命令
aiPlatService.exe install
启动服务
E:\aiplatformService>aiPlatService.exe stop
2019-09-05 15:59:31,974 INFO - Stopping the service with id 'aiPlat'
关闭服务
E:\aiplatformService>aiPlatService.exe start
2019-09-05 15:59:38,399 INFO - Starting the service with id 'aiPlat'
卸载服务命令
aiPlatService.exe uninstall
成功运行后如下

参考:https://reflectoring.io/autostart-with-winsw/
将springboot安装成windows服务启动。的更多相关文章
- 【先定一个小目标】Redis 安装成windows服务-开机自启
1.第一步安装成windows服务的,开机自启动 redis-server --service-install redis.windows.conf 2.启动\关闭 redis-server --se ...
- Java的jar文件安装成windows 服务
Java的jar文件安装成windows 服务: 1.下载:nssm,复制到jar文件目录下 2. jar文件目录下创建bat文件[run.bat],内容为[java -jar 文件名.jar] 3. ...
- Nginx 安装成 Windows 服务
Nginx 安装成Windows 服务方法,具体方法如下 1. 下载nginx windows版本 http://www.nginx.org 2. 下载微软的2个工具: instsrv.exe.srv ...
- Redis是可以安装成windows服务-开机自启
其实Redis是可以安装成windows服务的,开机自启动,命令如下 redis-server --service-install redis.windows.conf 安装完之后,就可看到Redis ...
- 使用srvany.exe把程序安装成windows服务的方法
http://mazhihui.iteye.com/blog/1294431 srvany.exe是什么? srvany.exe是Microsoft Windows Resource Kits工具集的 ...
- 使用srvany.exe将程序安装成windows服务的详细教程
srvany.exe介绍 srvany.exe是Microsoft Windows Resource Kits工具集的一个实用的小工具,用于将任何EXE程序作为Windows服务运行.也就是说srva ...
- Redis是可以安装成windows服务-开机自启 win7 64位
其实Redis是可以安装成windows服务的,开机自启动,命令如下: redis-server --service-install redis.windows.conf 安装完之后,就可看到Redi ...
- 使用srvany.exe把程序安装成windows服务
srvany.exe介绍 srvany.exe是Microsoft Windows Resource Kits工具集的一个实用的小工具,用于将任何EXE程序作为Windows服务运行.也就是说srva ...
- ELK安装成windows服务
一.Elasticsearch安装成windows服务 我的es所在路径为:D:\ELK5.5.0\elasticsearch-5.5.0 Java 安装目录为:C:\Program Files\Ja ...
随机推荐
- Centos7下安装Elasticsearch 5.6.6
环境 因为elasticsearch是用java编写的,所以需要先安装JDK ES 5,安装需要 JDK 8 以上ES 6.5,安装需要 JDK 11 以上ES 7.2.1,内置了 JDK 12 安装 ...
- pipenv安装报错ReadTimeoutError
原因:pip下载源默认设置为国外 解决:将pip下载源切换为国内地址 操作: 在C:\Users\Administrator\下新建pip文件夹,在创建pip.ini文件,拷贝下面代码进去,保存 切换 ...
- 部署kibana节点
部署Kibana节点 1.查看系统环境: [root@Kibana ~]# hostname Kibana [root@Kibana ~]# cat /etc/redhat-release CentO ...
- Java集合--Vector
转载请注明出处:http://www.cnblogs.com/skywang12345/p/3308833.html 第1部分 Vector介绍 Vector简介 Vector 是矢量队列,它是JDK ...
- C语言——for循环和while循环的效率区别——类似哨兵思想
int ID_Conv_Sentinel(int u16device_cfg_num) { int i8id; int size=0; int i=0; size = sizeof(Device_ID ...
- 更改ejs模板引擎的后缀为html
安装 EJS 在项目目录右键->Open Command Prompt Here 输入 npm install ejs 打开app.js //app.set('view engine', 'ja ...
- Python3发送webservice请求
Python3使用suds-jurko库来发送webservice接口请求 导入请求webservice接口需要用到的包 pip install suds-jurko 第一步:导入所需要的包 from ...
- pyecharts v1 版本 学习笔记 饼图,玫瑰图
饼图: 普通案例 from example.commons import Faker from pyecharts import options as opts from pyecharts.char ...
- percona-toolkit 主从工具 master-slave
复制类 pt-heartbeat 监控mysql复制延迟 pt-slave-delay 设定从落后主的时间 pt-slave-find 查找和打印所有mysql复制层级关系 pt-slav ...
- ueditor实现ctrl+v粘贴word图片并上传
图片的复制无非有两种方法,一种是图片直接上传到服务器,另外一种转换成二进制流的base64码 目前限chrome浏览器使用,但是项目要求需要支持所有的浏览器,包括Windows和macOS系统.没有办 ...