-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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 applytype: enhancementA general enhancementA general enhancement
Description
Anthony Gerrard opened SPR-10426 and commented
Status Quo
Because the MVC test framework uses a subclass of DispatcherServlet
it makes it difficult to test functionality if your application overrides the DispatcherServlet
.
Proposal
It would be nice if you could pass in a DispatcherServlet
say like this:
this.mockMvc = MockMvcBuilders
.webAppContextSetup(applicationContext, new MyDispatcherServlet())
.build();
You'd obviously need to tweak what is done under the covers. Maybe switching TestDispatcherServlet
to be a decorator?
Affects: 3.2.2
Issue Links:
- Improve support for custom HTTP verbs in Spring MVC Test [SPR-13719] #18292 Improve support for custom HTTP verbs in Spring MVC Test
1 votes, 4 watchers
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 applytype: enhancementA general enhancementA general enhancement