javaspring-bootjetty-10

Does Spring Boot 2.5.1 actually support HTTP/2 using Jetty 10?


Trying to use Jetty 10 with HTTP/2 (h2) in Spring Boot 2.5.1 results in a 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) works fine, as stated here (it still hurts): https://github.com/spring-projects/spring-boot/issues/26979, but adding SSL breaks the startup.

Using Jetty 9.4 instead, it works flawlessly. The thing that puzzles me is that the code seems fine, Spring Boot is passing the right arguments and the method does actually exist in the Jetty class.

Has anyone else experienced this? There doesn't seem to be any issue about this in Github, and I find it rather odd that I'm the first one trying this setup.

Sample project: https://github.com/hectorlf/spring-boot-jetty10-test


Solution

  • This was caused by a bug in Spring Boot 2.5. Thank you for bringing it to our attention. It has been fixed and the fix will be available in Spring Boot 2.5.2.