spring-mvcspring-bootspring-webfluxservlet-4

Spring Boot Servlet 4 support


Which version of Spring Boot will (or does) officially support Servlet 4 spec? Where can one see the new features that come with it documented?

Thank you.


Solution

  • Spring Framework 5 supports the Servlet 4 spec (see SPR-12674). Not a lot of new features related to that, really. You can now inject a PushBuilder as a controller method argument if it is available (HTTP/2 enabled, supported by the client, etc).

    Note that you need to use a Servlet 4 based container to use those features (see SPR-15593), or you'll need to fall back on container specific APIs which have been available for quite a while now.

    Spring Framework does the job here, so there isn't anything special scheduled for now in Spring Boot 2.0; don't hesitate to open enhancement requests on the dedicated issue tracker if you've got ideas.