4. 将Spring Boot应用程序注册成为系统服务
前期准备
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
</parent>
<dependencies>
....
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
</plugins>
</build>打包成可执行jar包
注册成为liunx服务
System V Init
Systemd
Upstart
在Windows中安装
Windows Service Wrapper
Java Service Wrapper
最后更新于
这有帮助吗?