Affects: Spring Framework 6.0.0-RC4

I upgraded my example projects from Spring 6.0.0-RC2 to Spring 6.0.0-RC4, it fails my controller tests.

NoClassDefFound jakarta/servlet/ServletConnection 

The complete log stack: https://github.com/hantsy/spring6-sandbox/actions/runs/3449289782/jobs/5757083220

It seems the spring-webmvc and spring-test removes the dependency of jakarta.servlet, etc?

Comment From: bclozel

Our Servlet mocks require Servlet 6.0 now. See https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-6.x#testing and #29435

Comment From: hantsy

OK, upgraded to Jakarta EE 10 APIs, it is simply resolved.

Comment From: ratoaq2

Spring 6 supports Jetty 11, which requires Servlet 5.0. But now servlet mock requires Servlet 6.0.

Currently, either I use servlet 5.0 for my application to start, or servlet 6.0 to run the tests with servlet mock