Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Add more default HandlerMethodArgumentResolver's to ExceptionHandlerExceptionResolver [SPR-15489] #20049
The documentation at 22.11.2 says that
However in reality, ExceptionHandlerExceptionResolver#getDefaultArgumentResolvers is much skimmer than RequestMappingHandlerAdapter#getDefaultArgumentResolvers. There is no documentation which resolvers are or are not part of ExceptionHandlerExceptionResolver's defaults.
Specifically, I need RequestHeaderMethodArgumentResolver. My use case is that server requirements changed, and now under certain conditions, the server must not accept a request, and return 400-BadRequest. However since some clients are not yet updated, this will cause them to crash. Therefore, new clients send a custom header to say that they are ready to receive 400-BadRequest. Thus, in the
At best, you should equate all default handlers for ExceptionHandlerExceptionResolver and RequestMappingHandlerAdapter. If that's impossible, then at least go through all argument resolvers that are not in ExceptionHandlerExceptionResolver, re-evaluate if it's impossible to move it to Ex.HandlerEx.Resolver, and have clear documentation in 22.11.2 as for which argument and return value handlers are supported, and which are not.
No further details from SPR-15489