mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-25 00:09:02 +00:00
Property init HandlerMapping in standalone MockMvc
Issue: SPR-13637
This commit is contained in:
+1
@@ -342,6 +342,7 @@ public class StandaloneMockMvcBuilder extends AbstractMockMvcBuilder<StandaloneM
|
||||
StaticRequestMappingHandlerMapping hm = config.getHandlerMapping();
|
||||
hm.setServletContext(wac.getServletContext());
|
||||
hm.setApplicationContext(wac);
|
||||
hm.afterPropertiesSet();
|
||||
hm.registerHandlers(this.controllers);
|
||||
wac.addBean("requestMappingHandlerMapping", hm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user