下载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. 当前form窗体随系统屏幕变化

    private void 新建_Load(object sender, EventArgs e) { int DeskWidth = Screen.PrimaryScreen.WorkingArea. ...

  2. 牛客练习赛48 A· 小w的a+b问题 (贪心,构造,二进制)

    牛客练习赛48 A· 小w的a+b问题 链接:https://ac.nowcoder.com/acm/contest/923/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C ...

  3. 开启树莓派自带的VNC功能

    前期准备 树莓派可以连接路由器或连上wifi,我用的是自己的小米路由器,目的是为了获取内网IP 工具准备 下载 vnc viewer https://www.realvnc.com/en/connec ...

  4. 在stm32开发可以调用c标准库的排序和查找 qsort bsearch

    在嵌入式开发中,可以使用c标准库自带的库函数,而不用自己去早轮子,qsort 和bsearch就是其中的两个比较好用的 二分法查找,前提是已经排序好的数据.下面的代码, 如果数据为排序,则要进行排序后 ...

  5. 处理 read_csv 报错 OSError:Initializing from file failed

    1.问题发现 df=pd.read_csv("X-go报表_交易20191118.csv") print(df.info()) File "pandas/_libs/pa ...

  6. 用jackson的@JsonProperty注解属性名,会多出一个字段

    遇见了这个情况,我的字段定义是xVal,yVal,用的lombok的@Data注解.然后查询到了下面这偏文章,https://bbs.csdn.net/topics/392305619,里面的回答是图 ...

  7. SIGAI深度学习第七集 卷积神经网络1

    讲授卷积神经网络核心思想.卷积层.池化层.全连接层.网络的训练.反向传播算法.随机梯度下降法.AdaGrad算法.RMSProp算法.AdaDelta算法.Adam算法.迁移学习和fine tune等 ...

  8. vue+axios+elementUI文件上传与下载

    vue+axios+elementUI文件上传与下载 Simple_Learn 关注  0.5 2018.05.30 10:20 字数 209 阅读 15111评论 4喜欢 6 1.文件上传 这里主要 ...

  9. .pid文件

    pid文件为进程文件,默认的在每个/var/run/目录下生成,当使用systemctl进行进程启动的时候,在这个目录下就会生成相应的pid文件,今天在进行poc测试的时候,对进程执行了enable操 ...

  10. vue中修改第三方组件的样式不生效

    问题 在使用element-ui时,有时候想要修改组件内的样式,但不成功,例如 <div class="test"> <el-button>按钮</e ...