spring-boothttp2

How to serve http2 from Spring boot


I'm trying to start a Spring boot server to serve http2 instead of http1.1. The code is here. I thought having the settings in my application.properties is enough for the server to start serving traffic with http2 but when I start the server from Intellij on my Windows machine, the server starts fine without any warnings or errors. When I did a curl -k -sI https://localhost:8443/test, I'm still getting HTTP/1.1 in the header. Why is my local server not using http2?


Solution

  • Based on hitting my server from Chrome, it seems the server is indeed serving through h2. It is my curl that doesn't support http/2.