将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 ...
随机推荐
- linux(centos)下安装supervisor进程管理工具
在接触supervisor进程管理工具之前,使用springboot打包部署到linux服务器的流程是这样子的,如下图所示: 上图展示的就是最一般的流程,如果项目是小项目或者demo可以这样子去部署, ...
- docker在Windows环境下的安装
Windows环境下安装 docker有两种安装包 一.Docker for Windows(目前只能在 64 位的 Windows10 专业版.企业版.教育版下才能安装) 二.Docker Tool ...
- java之rpc/orm
Netty线程模型 其中ChannelPiepline的设计模型采用的是Handler组成的责任链模型 blocking I/O 阻塞nonblocking I/O 非阻塞I/O multiplexi ...
- JavaScript基础习题
1.实现输入框的双向绑定 解析:所谓双向绑定,即view->model, model->view,可以考虑对象劫持,监听对象属性的变化 <input type="input ...
- linux学习-添加多个硬盘和lvm配置
原文 一般,服务器会有多个硬盘,一块硬盘分区安装操作系统,另外多块硬盘分区做存储使用.现在测试添加多块硬盘分区,使用lvm进行实现动态磁盘分配. 1.新增硬盘查看 fdisk -l 可以看到新增的两块 ...
- 11 - Vue模板语法
Vue.js 使用了基于 HTML 的模板语法,允许开发者声明式地将 DOM 绑定至底层 Vue 实例的数据. 所有 Vue.js 的模板都是合法的 HTML ,所以能被遵循规范的浏览器和 HTML ...
- 014_linux驱动之_信号符号名、描述和它们的信号值
符号名 信号值 描述 是否符合POSIX SIGHUP 1 在控制终端上检测到挂断或控制线程死 亡 是 SIGINT 2 交互注意信号 是 SIGQUIT 3 交 互中止信号 是 SIGILL 4 检 ...
- leetcode解题报告(11):Search Insert Position
描述 Given a sorted array and a target value, return the index if the target is found. If not, return ...
- docker 安装redis 注意事项
一. redis配置文件修改(重要) ~/redis.conf 中daemonize=NO.非后台模式,如果为YES 会的导致 redis 无法启动,因为后台会导致docker无任务可做而退出. 三 ...
- AGC024E Sequence Growing Hard
题意 给出\(n\),\(m\),\(mu\),问有多少个序列组\((A_0,A_1,\dots,A_n)\)满足: 序列\(Ai\)的长度恰好为\(i\) 所有元素均在\([1,m]\) \(A_{ ...