【问题标题】:spring-boot embedded tomcat doesnot start [2.2.6 vs 2.2.2]spring-boot 嵌入式 tomcat 无法启动 [2.2.6 vs 2.2.2]
【发布时间】:2020-04-12 21:00:33
【问题描述】:

1) 克隆这个 repo https://github.com/spring-guides/gs-spring-boot

2) 导航到完成目录并运行

./mvnw spring-boot:run

您将能够导航到 http://localhost:8080/ 以查看来自 Spring Boot 的问候。 这符合预期。

3) 现在,让我们在 pom.xml 中将 spring-boot 版本从 2.2.2 更新到 2.2.6。

<version>2.2.6.RELEASE</version>

尝试.\mvnw spring-boot:run Tomcat 不再出现。出于同样的原因,http 端点不起作用。在这个版本升级中我缺少什么?

【问题讨论】:

  • 您在服务器日志中看到了什么?任何错误/消息?
  • 我最好的猜测是升级到 2.2.5 时 jar 文件损坏了。不分享日志就没法说了。
  • 感谢 Stephane 指出这一点。我在日志中发现了一个相关的错误,所以我清除了本地 maven repo -- invalid LOC header (bad signature)

标签: spring-boot


【解决方案1】:

正如@Stephane Nicoll 指出的那样,我查看了日志以找到这些错误。

[ERROR] 读取 /Users/testUser/.m2/repository/org/springframework/spring-web/5.2.5.RELEASE/spring-web-5.2.5.RELEASE.jar 时出错;无效的 LOC 标头(错误的签名)

[ERROR] 读取 /Users/testUser/.m2/repository/org/assertj/assertj-core/3.13.2/assertj-core-3.13.2.jar 时出错;无效的 LOC 标头(错误的签名)

[ERROR] 读取 /Users/testUser/.m2/repository/net/bytebuddy/byte-buddy/1.10.8/byte-buddy-1.10.8.jar 时出错;无效的 LOC 标头(错误的签名)

我清除了 .m2/repository/ 目录,随后下载的工作正常。

谢谢斯蒂芬。

【讨论】:

    猜你喜欢
    • 2016-08-19
    • 1970-01-01
    • 2017-09-20
    • 2020-07-24
    • 2023-03-26
    • 2019-03-13
    • 2021-05-25
    • 2014-06-27
    • 2019-10-11
    相关资源
    最近更新 更多