下载Windows Service Wrapper

本文下载了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服务启动。的更多相关文章

  1. 【先定一个小目标】Redis 安装成windows服务-开机自启

    1.第一步安装成windows服务的,开机自启动 redis-server --service-install redis.windows.conf 2.启动\关闭 redis-server --se ...

  2. Java的jar文件安装成windows 服务

    Java的jar文件安装成windows 服务: 1.下载:nssm,复制到jar文件目录下 2. jar文件目录下创建bat文件[run.bat],内容为[java -jar 文件名.jar] 3. ...

  3. Nginx 安装成 Windows 服务

    Nginx 安装成Windows 服务方法,具体方法如下 1. 下载nginx windows版本 http://www.nginx.org 2. 下载微软的2个工具: instsrv.exe.srv ...

  4. Redis是可以安装成windows服务-开机自启

    其实Redis是可以安装成windows服务的,开机自启动,命令如下 redis-server --service-install redis.windows.conf 安装完之后,就可看到Redis ...

  5. 使用srvany.exe把程序安装成windows服务的方法

    http://mazhihui.iteye.com/blog/1294431 srvany.exe是什么? srvany.exe是Microsoft Windows Resource Kits工具集的 ...

  6. 使用srvany.exe将程序安装成windows服务的详细教程

    srvany.exe介绍 srvany.exe是Microsoft Windows Resource Kits工具集的一个实用的小工具,用于将任何EXE程序作为Windows服务运行.也就是说srva ...

  7. Redis是可以安装成windows服务-开机自启 win7 64位

    其实Redis是可以安装成windows服务的,开机自启动,命令如下: redis-server --service-install redis.windows.conf 安装完之后,就可看到Redi ...

  8. 使用srvany.exe把程序安装成windows服务

    srvany.exe介绍 srvany.exe是Microsoft Windows Resource Kits工具集的一个实用的小工具,用于将任何EXE程序作为Windows服务运行.也就是说srva ...

  9. ELK安装成windows服务

    一.Elasticsearch安装成windows服务 我的es所在路径为:D:\ELK5.5.0\elasticsearch-5.5.0 Java 安装目录为:C:\Program Files\Ja ...

随机推荐

  1. openpose-opencv 的body数据多人体姿态估计

    介绍 opencv除了支持常用的物体检测模型和分类模型之外,还支持openpose模型,同样是线下训练和线上调用.这里不做特别多的介绍,先把源代码和数据放出来- 实验模型获取地址:https://gi ...

  2. js 同步 异步 宏任务 微任务 文章分享

    分享一篇 写的很好的 宏任务 微任务  同步异步的文章 文章原地址: https://juejin.im/post/59e85eebf265da430d571f89 这一次,彻底弄懂 JavaScri ...

  3. Spring Bean装配(下)——注解

    @Repository,@Service,@Controller这三个注解是基于component定义的注解 component-scan:组件扫描 base-package:扫描这个下的所有类 &l ...

  4. 从package.json中获取属性

    var pjson = require('./package.json'); console.log(pjson.version); 详见:https://stackoverflow.com/ques ...

  5. BZOJ 2095 [Poi2010]Bridges (二分+最大流判断混合图的欧拉回路)

    题面 nnn个点,mmm条双向边(正向与反向权值不同),求经过最大边权最小的欧拉回路的权值 分析 见 commonc大佬博客 精髓就是通过最大流调整无向边的方向使得所有点的入度等于出度 CODE #i ...

  6. sql 约束汇总

    主要就是增加数据约束的.   Oracle中的约束简单介绍 约束   Including Constraints     在数据库中使用约束(constraints)是为了在该数据库中实施所谓的&qu ...

  7. CF922D Robot Vacuum Cleaner 贪心+排序

    正确的贪心方法:按照比例排序. code: #include <bits/stdc++.h> #define N 200000 #define ll long long #define s ...

  8. 定时器TIM,pwm

    一.定时器 1.     定义 设置等待时间,到达后则执行指定操作的硬件. 2.    STM32F407的定时器有以下特征 具有基本的定时功能,也有PWM输出(灯光控制.电机的转速).脉冲捕获功能( ...

  9. min_25筛学习笔记【待填坑】

    看见ntf和pb两位大佬都来学了,然后就不自觉的来学了. 我们考虑这样一个问题. $$ans=\sum_{i=1}^nf(i)$$其中$1\leq n\leq 10^{10}$ 其中$f(i)$是一个 ...

  10. vue中mixin的理解与用法

    vue中提供了一种混合机制--mixins,用来更高效的实现组件内容的复用.最开始我一度认为这个和组件好像没啥区别..后来发现错了.下面我们来看看mixins和普通情况下引入组件有什么区别? 组件在引 ...