目录
当我们在Windows上使用cmd启动服务,或者使用“startup.bat”启动项目是都会打开一个黑窗口,容易被其他人意外关闭,导致服务关闭。为了解决这样的尴尬的误会,我们可以使用winserver把我们的应用或者项目注册成一个服务。
github.com
https://github.com/winsw/winsw/releases/download/v2.12.0/WinSW-x64.exe
projectName.xml配置如下:
- <service>
-
- <id>high-serverid>
-
- <name>high-servername>
-
- <description>high的项目description>
-
- <executable>javaexecutable>
-
- <arguments>-jar D:\services\tourism-monitoring-platform-test-1.0.0\tourism-monitoring-platform\boot\tourism-monitoring-platform.jararguments>
-
- <log mode="reset"/>
- service>

server.exe install

server.exe uninstall

安装好服务后,我们就可以在这里启动或者停止服务了。
