mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Set the ApplicationContext prop of ExceptionResolver
The MVC Java config now sets the ApplicationContext property of ExceptionHandlerExceptionResolver. Issue: SPR-9997
This commit is contained in:
+1
@@ -629,6 +629,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
*/
|
||||
protected final void addDefaultHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) {
|
||||
ExceptionHandlerExceptionResolver exceptionHandlerExceptionResolver = new ExceptionHandlerExceptionResolver();
|
||||
exceptionHandlerExceptionResolver.setApplicationContext(this.applicationContext);
|
||||
exceptionHandlerExceptionResolver.setContentNegotiationManager(mvcContentNegotiationManager());
|
||||
exceptionHandlerExceptionResolver.setMessageConverters(getMessageConverters());
|
||||
exceptionHandlerExceptionResolver.afterPropertiesSet();
|
||||
|
||||
Reference in New Issue
Block a user