一、 將java jar包和下載的WinSW.NET4.exe放在同一個文件夾目錄下
二、 重命名WinSW.NET4.exe為shiro.exe
三、編輯shiro.xml文件
<configuration>
<id>shiro</id>
<name>shiro</name>
<description>This is shiro</description>
<executable>java</executable>
<arguments>-jar shiro.jar</arguments>
<!-- 開機啟動 -->
<startmode>Automatic</startmode>
<logpath>logs</logpath>
<log mode="roll-by-time">
<pattern>yyyyMMdd</pattern>
</log>
</configuration>
四、執行以下cmd命令
-
注冊服務:shiro.exe install
-
啟動命令: net start shiro
-
停止命令:net stop shiro
-
刪除命令: sc delete shiro
