mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
cfe2af7690
The new @MVC support classes select a HandlerMethodArgumentResolver and a HandlerMethodReturnValueHandler statically, i.e. based on the signature of the method, which means that a controller method can't declare a more general return type like Object but actually return a more specific one, e.g. String vs RedirectView, and expect the right handler to be used. The fix ensures that a HandlerMethodReturnValueHandler is selected based on the actual return value type, which is something that was supported with the old @MVC support classes. One consequence of the change is the selected HandlerMethodReturnValueHandler can no longer be cached but that matches the behavior of the old @MVC support classes. Issues: SPR-9218