When no API version is provided, static resources fail to load
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(withApiVersionStrategy)RequestMappingHandlerMapping(withApiVersionStrategy)WelcomePageHandlerMappingBeanNameUrlHandlerMappingWelcomePageNotAcceptableHandlerMappingSimpleUrlHandlerMapping
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.