I am experimenting with the API Versioning feature introduced in Spring 7.
I have an image file named foo.png under the resources/static directory.
However, when I try to access http://localhost:8080/foo.png in the browser, the image cannot be loaded.
In my case, the HandlerMappings are evaluated in the following order:
RouterFunctionMapping (with ApiVersionStrategy)
RequestMappingHandlerMapping (with ApiVersionStrategy)
WelcomePageHandlerMapping
BeanNameUrlHandlerMapping
WelcomePageNotAcceptableHandlerMapping
SimpleUrlHandlerMapping
I expect the image resource to be handled by SimpleUrlHandlerMapping. However, due to the ordering, the request fails earlier in the initApiVersion(HttpServletRequest) method of RouterFunctionMapping.