将java控制台程序做成windows服务的方式启动

2023-04-19  本文已影响0人  南瓜pump
<service>
  
  <!-- ID of the service. It should be unique across the Windows system(服务编号)-->
  <id>personCarSync</id>
  <!-- Display name of the service 服务名称 -->
  <name>personCarSync Service (powered by WinSW)</name>
  <!-- Service description 服务描述 -->
  <description>This service is a service created from a minimal configuration</description>
  
  <!-- Path to the executable, which should be started,执行程序,需要预先配置java环境 -->
  <executable>java</executable>
  <!-- java run arguements 运行参数 -->
  <arguments>-jar person-car-sync-1.0-SNAPSHOT.jar --spring.profiles.active=xxqt</arguments>

</service>
安装服务
上一篇下一篇

猜你喜欢

热点阅读