gpt4 book ai didi

java - 在 ec2 中部署类似服务的 springboot 问题

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:07:40 28 4
gpt4 key购买 nike

我通过以下方式运行应用程序:java -jar app.jar。效果很好!

但安装程序像服务一样运行 https://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html .

sudo service ccth start时,出现如下错误:

/etc/init.d/ccth: line 1: $'PK\003\004': command not found

/etc/init.d/ccth: line 2:Dr�Lorg/PK: No such file or directory

/etc/init.d/ccth: line 3:Dr�Lorg/springframework/PK: No such file or directory

/etc/init.d/ccth: line 4:Dr�Lorg/springframework/boot/PK: No such file or directory

/etc/init.d/ccth: line 5: $'\bDr\376L': command not found

/etc/init.d/ccth: line 6:Dr�L%org/springframework/boot/loader/data/PK: No such file or directory

/etc/init.d/ccth: line 7:Dr�L/springframework/boot/loader/jar/PK: No such file or directory

/etc/init.d/ccth: line 8: syntax error near unexpected token `$'org/springframework/boot/loader/archive/PK\003\004''

/etc/init.d/ccth: line 8: Dr�L(org/springframework/boot/loader/archive/PK'

我该如何修复它们?

最佳答案

感谢您提出问题。我花了一些时间研究完全相同的问题。我使用 gradle 构建 jar,我需要包括:

bootJar {
launchScript()
}

然后确保运行新创建的文件。

关于java - 在 ec2 中部署类似服务的 springboot 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52275793/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com