-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: testIssues in the test moduleIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply
Description
Christopher Smith opened SPR-12976 and commented
I'm trying to run some MockMvc test with the new HtmlUnit support, but for some reason MockMvc isn't matching mappings:
2015-05-04 01:46:33.357 INFO --- [ main] ilder$StaticRequestMappingHandlerMapping : Mapped "{[/about/{page}/{page2}],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.artsquare.gallery.web.html.StaticPagesHtmlController.aboutDigitization(java.lang.String,java.lang.String)
2015-05-04 01:46:33.366 INFO --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.test.web.servlet.setup.StubWebApplicationContext@1cc9cfb2
2015-05-04 01:46:33.381 DEBUG --- [ main] o.s.w.c.s.StandardServletEnvironment : Adding [servletConfigInitParams] PropertySource with lowest search precedence
2015-05-04 01:46:33.381 DEBUG --- [ main] o.s.w.c.s.StandardServletEnvironment : Adding [servletContextInitParams] PropertySource with lowest search precedence
2015-05-04 01:46:33.381 DEBUG --- [ main] o.s.w.c.s.StandardServletEnvironment : Adding [systemProperties] PropertySource with lowest search precedence
2015-05-04 01:46:33.381 DEBUG --- [ main] o.s.w.c.s.StandardServletEnvironment : Adding [systemEnvironment] PropertySource with lowest search precedence
2015-05-04 01:46:33.381 DEBUG --- [ main] o.s.w.c.s.StandardServletEnvironment : Initialized StandardServletEnvironment with PropertySources [servletConfigInitParams,servletContextInitParams,systemProperties,systemEnvironment]
2015-05-04 01:46:33.381 INFO --- [ main] o.s.mock.web.MockServletContext : Initializing Spring FrameworkServlet ''
2015-05-04 01:46:33.382 INFO --- [ main] o.s.t.web.servlet.TestDispatcherServlet : FrameworkServlet '': initialization started
2015-05-04 01:46:33.382 INFO --- [ main] o.s.t.web.servlet.TestDispatcherServlet : FrameworkServlet '': initialization completed in 0 ms
2015-05-04 01:46:34.498 WARN --- [ main] o.s.web.servlet.PageNotFound : No mapping found for HTTP request with URI [/about/digitization/comparison] in DispatcherServlet with name ''
Excerpts from Geb spec; can fill in if there's something particular that's needed:
@Autowired
StaticPagesHtmlController c
MockMvc buildMvc() {
MockMvcBuilders.standaloneSetup(c).build()
}
def setup() {
MockMvc mvc = buildMvc()
driver = new MockMvcHtmlUnitDriver(mvc, true)
browser.driver = driver
}Affects: 4.1.6
Issue Links:
- RequestMapping maps root-controller handler methods with double slashes [SPR-12975] #17566 RequestMapping maps root-controller handler methods with double slashes
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply