You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the optimization of ProducesRequestCondition, HandlerMapping caches MediaTypesAttribute.
However, WebFluxEndpointHandlerMapping and CloudFoundryWebFluxEndpointHandlerMapping do not delete the cached MediaTypesAttribute and affect the resolution of MediaTypes of other HandlerMappings. ( On the other hand, the class that inherits RequestMappingHandlerMapping deletes the cache.)
These issues are occurring not only in Spring Webflux's HandlerMapping but also in Spring MVC's HandlerMapping.
To solve this problem, I think you need one of the following measures:
Add a process to delete the cache at the end of HandlerMapping to AbstractWebFluxEndpointHandlerMapping and AbstractWebMvcEndpointHandlerMapping.
Move the process of deleting the cache at the end of HandlerMapping from RequestMappingHandlerMapping to RequestMappingInfoHandlerMapping of the parent class.
If my proposed solution is correct, I am ready to create a PR.