【问题标题】:Does Spring Boot 2.5.1 actually support HTTP/2 using Jetty 10?Spring Boot 2.5.1 是否真的支持使用 Jetty 10 的 HTTP/2?
【发布时间】:2021-06-20 21:17:38
【问题描述】:

尝试在 Spring Boot 2.5.1 中将 Jetty 10 与 HTTP/2 (h2) 一起使用会导致 NoSuchMethodError:

java.lang.NoSuchMethodError: 'void org.eclipse.jetty.server.SslConnectionFactory.<init>(org.eclipse.jetty.util.ssl.SslContextFactory, java.lang.String)'

HTTP/2 over TCP (h2c) 工作正常,如此处所述(仍然很痛):https://github.com/spring-projects/spring-boot/issues/26979,但添加 SSL 会中断启动。

改用 Jetty 9.4,它可以完美运行。令我困惑的是代码看起来很好,Spring Boot 传递了正确的参数,并且该方法确实存在于 Jetty 类中。

有其他人经历过吗?在 Github 中似乎没有任何问题,并且 我觉得很奇怪,我是第一个尝试这种设置的人。

示例项目:https://github.com/hectorlf/spring-boot-jetty10-test

【问题讨论】:

  • NoSuchMethod 通常意味着提供了预期的类的不同版本。通常是包含库的错误版本。

标签: java spring-boot jetty-10


【解决方案1】:

这是由bug in Spring Boot 2.5 引起的。感谢您提请我们注意。它已被修复,该修复将在 Spring Boot 2.5.2 中提供。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-26
    • 1970-01-01
    • 2014-11-26
    • 2014-09-17
    • 2019-09-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多