如何将作为Windows运行,因为我正在跟踪春用温索。
步骤:
winsw.1.19.exe。接下来,他们要求将winsw.exe替换为myApp.exe,并在安装指南中提到我需要编辑配置文件,但我没有得到需要更改的配置文件在哪里。
注意:我已经有了Spring应用程序作为服务工作,我需要以Windows服务的形式运行这个服务。
发布于 2016-12-13 09:19:05
winsw文档提到了这个配置文件是什么,而您所引用的文档也显示了如何使用它的一个例子。
其思想如下:将可执行文件重命名为myApp.exe,并创建一个名为myApp.xml的配置文件。我通常像这样配置服务(尽管它与spring示例有点不同):
<service>
<id>windowsServiceId</id> <!-- Change this -->
<name>Readable name of the windows service</name><!-- Change this -->
<description>Description of the windows service</description><!-- Change this -->
<workingdirectory>%BASE%\</workingdirectory>
<logpath>%BASE%\logs</logpath>
<executable>java</executable>
<arguments>-jar my-application.jar</arguments><!-- Change this -->
</service>如果两者都已到位,则可以运行以下命令来安装windows服务:
myApp.exe installhttps://stackoverflow.com/questions/41116708
复制相似问题