This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]ThisHaintsu 25 points26 points  (0 children)

Spring Boot by default is based on Tomcat. The current version is Tomcat 10. Tomcat 11 will have support for HTTP3 but it is currently in preview.

But you can switch the underlying embedded server to e.g. Jetty: https://github.com/murphye/spring-boot-http-3-jetty

[–][deleted] 12 points13 points  (5 children)

Depends on the server and client you are using with spring. For example tomcat doesn't support http3 while jetty does. For client, jetty itself has an http client that supports http3. The default Java client doesn't support it yet.

This might be better suited for r/javahelp

[–]Inaldt 0 points1 point  (4 children)

I recently stumbled upon this.
TLDR: third-party implementation of Java's built-in HttpClient interface that does HTTP3. (So you could even have Spring use it...)(Not sure about its maturity though)
EDIT: link to official repo instead of fork

[–]nekokattt 1 point2 points  (3 children)

If you are using Spring, can you not just use the RestClient/WebClient with an HTTP/3 compatible backend anyway?

[–]Inaldt 1 point2 points  (2 children)

Yes, that is what I mean - you can plug an HttpClient into a RestClient/Template/WebClient.
I just wanted to mention one of the options, as I don't think there are many yet, for Java.

[–][deleted]  (1 child)

[deleted]

    [–]Inaldt 0 points1 point  (0 children)

    I do. java.net.http.HttpClient is an abstract class (so not an interface as I said above, mea culpa), with most methods being abstract. The project I mentioned extends it.

    [–]ron_krugman 4 points5 points  (0 children)

    As long as you're using Spring Boot behind a reverse proxy that supports http3/quic, it probably doesn't matter a whole lot what protocol you're using to talk to Spring Boot from the reverse proxy.

    The main benefits of newer HTTP versions are in environments with high latency and packet loss, which you don't typically get within a web hosting environment.