使用 spring boot maven 插件,我们能够生成可执行的 jar。我们可以使用 java -jar 执行 jar ...
在 Spring Boot 中,还有另一个选项 installation 。这会生成可以添加到 init.d 中的 jar。
但是是否可以生成一个可用于启动|停止|重新启动 Spring Boot 应用程序的 sh|cmd 文件?
最佳答案
创建“完全可执行”jar 的可执行 true 标志实际上将 shell 脚本预先添加到 jar 的开头。
它也可以在 init.d 之外运行。试试这个:
./myapp.jar start
关于spring - 如何使用spring boot maven插件生成可执行脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34368944/