Support @ControllerAdvice in StandaloneMockMvcBuilder

Issue: SPR-12751
This commit is contained in:
Rossen Stoyanchev
2015-02-25 16:57:58 -05:00
parent cc33d3fac8
commit 2dd5875964
5 changed files with 94 additions and 11 deletions

View File

@@ -207,6 +207,10 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
this.applicationContext = applicationContext;
}
public ApplicationContext getApplicationContext() {
return this.applicationContext;
}
/**
* Set the {@link javax.servlet.ServletContext}, e.g. for resource handling,
* looking up file extensions, etc.
@@ -216,6 +220,9 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
this.servletContext = servletContext;
}
public ServletContext getServletContext() {
return this.servletContext;
}
/**
* Return a {@link RequestMappingHandlerMapping} ordered at 0 for mapping