Closed
Description
Affects: Spring Framework 5.3.4
After upgrading spring to 5.3.4 the constructor of MockHttpServletRequest
throws java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletMapping. The project uses older servlet api 3.1 because the tomcat 8.5.x is still used in production.
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
When the version of servlet api is changed to 4.0.0 or above, the exception is of course gone.
In [1] is mentioned that the older API should be sufficient for spring framework 5.x.
The Java EE 7 API level is required in Spring's corresponding modules now, with runtime support for the EE 8 level