xyc
18 小时以前 9b56330d694ef2082fa703c1062cad8ada3332f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="UTF-8"?>
<!--
  WinSW (Windows Service Wrapper) configuration for the TrafficAudit backend.
 
  Layout requirement: this file MUST stay in the same folder as the wrapper
  executable named trafficAudit.exe, the application jar, application.yml,
  docs\ and web\. WinSW looks for a config file whose name matches the
  executable (trafficAudit.exe -> trafficAudit.xml).
 
  %BASE% is expanded by WinSW to the folder that holds this file, so the
  service always runs with that folder as its working directory.
 
  The executable element below is rewritten with an absolute java.exe path by
  install-service.ps1 (a SYSTEM service does not inherit the interactive
  user PATH, so relying on PATH alone is fragile).
-->
<service>
  <id>TrafficAuditBackend</id>
  <name>TrafficAudit Backend</name>
  <description>TrafficAudit freight statistics audit backend (Spring Boot, HTTP port 8090).</description>
 
  <executable>java.exe</executable>
  <arguments>-Dfile.encoding=UTF-8 -jar "%BASE%\traffic-audit-server.jar"</arguments>
  <workingdirectory>%BASE%</workingdirectory>
 
  <!-- Start at boot, but delayed so a local MySQL service is ready first. -->
  <startmode>Automatic</startmode>
  <delayedAutoStart>true</delayedAutoStart>
 
  <!-- Restart on crash: quickly at first, then back off. Counter resets after 1 hour. -->
  <onfailure action="restart" delay="10 sec"/>
  <onfailure action="restart" delay="30 sec"/>
  <onfailure action="restart" delay="60 sec"/>
  <resetfailure>1 hour</resetfailure>
 
  <stoptimeout>30 sec</stoptimeout>
 
  <logpath>%BASE%\logs</logpath>
  <log mode="roll-by-size">
    <sizeThreshold>10240</sizeThreshold>
    <keepFiles>10</keepFiles>
  </log>
  <outfile>trafficAudit.out.log</outfile>
  <errfile>trafficAudit.err.log</errfile>
</service>