后端开发
网络新概念,云计算、大数据、O2O、电商。。。。
网络新概念,云计算、大数据、O2O、电商。。。。
2022-01-14 15:29:18
同理exe程序和java程序应该都都可以注册成服务
nginx和jeecgboot注册成服务的工具:
Windows service wrapper
https://github.com/winsw/winsw
下载relase中的WinSW.NET4.exe安装在.netframework4.0中,和nginx.exe放置到同一个目录,WinSW.NET4.exe修改成nginxservice.exe,同时下载配置文件模板,名字与exe相同nginxservice.xml
内容:
<service>
<!-- ID of the service. It should be unique across the Windows system-->
<id>nginx</id>
<!-- Display name of the service -->
<name>NginxService</name>
<!-- Service description -->
<description>This service is a service for nginx</description>
<!-- Path to the executable, which should be started -->
<executable>%BASE%\nginx.exe</executable>
</service>
jeecg发布执行命令是:java -jar c:\jeecg-boot-module-system-2.2.1.jar
注册服务方法一样:和jeecg-boot-module-system-2.2.1.jar放置到同一个目录,WinSW.NET4.exe修改成jeecgbootservice.exe,同时下载配置文件模板,名字与exe相同jeecgbootservice.xml
<service>
<!-- ID of the service. It should be unique across the Windows system-->
<id>jeecgboot</id>
<!-- Display name of the service -->
<name>JeecgbootService</name>
<!-- Service description -->
<description>This service is a service for jeecgboot lego system</description>
<!-- Path to the executable, which should be started -->
<executable>java</executable>
<arguments>-jar %BASE%\jeecg-boot-module-system-2.2.1.jar</arguments>
<log mode="roll"></log>
</service>