在mvn构建时直接将项目jar包做成服务第三方工具
只需要在pom文件中添加:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- 在打包时生成把jar包做成服务的文件 -->
<plugin>
<groupId>cn.joylau.code</groupId>
<artifactId>joylau-springboot-daemon-windows</artifactId>
<version>1.0.RELEASE</version>
<executions>
<execution>
<id>make-win-service</id>
<phase>package</phase>
<goals>
<goal>make-win-service</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
就算这个世道烂成一堆粪坑,那也不是你吃屎的理由