Reijhanniel Jearl Campos opened SPR-17520 and commented
We're heavily using Spring MVC, and its awesome Spring MVC test. Our use case is fairly advanced, for we write our custom org.springframework.web.servlet.HandlerMapping and org.springframework.web.servlet.HandlerAdapter . To make use of Spring MVC test however, we needed to duplicate org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder just to allow customization of such beans.
I found a ticket (#16166) that similarly describes the same, albeit only for:
/**
* Configure factory to create a custom {@link RequestMappingHandlerMapping}.
* @param factory the factory
* @since 5.0
*/
public StandaloneMockMvcBuilder setCustomHandlerMapping(Supplier<RequestMappingHandlerMapping> factory) {
this.handlerMappingFactory = factory;
return this;
}
We cannot use this method, because we're not relying on RequestMappingHandlerMapping and it doesn't yet have a setter for custom HandlerAdapter s.
Is there a better way to do this?
Affects: 5.1.2
Issue Links:
Referenced from: commits 2700993
Reijhanniel Jearl Campos opened SPR-17520 and commented
We're heavily using Spring MVC, and its awesome Spring MVC test. Our use case is fairly advanced, for we write our custom
org.springframework.web.servlet.HandlerMappingandorg.springframework.web.servlet.HandlerAdapter. To make use of Spring MVC test however, we needed to duplicateorg.springframework.test.web.servlet.setup.StandaloneMockMvcBuilderjust to allow customization of such beans.I found a ticket (#16166) that similarly describes the same, albeit only for:
We cannot use this method, because we're not relying on
RequestMappingHandlerMappingand it doesn't yet have a setter for customHandlerAdapters.Is there a better way to do this?
Affects: 5.1.2
Issue Links:
Referenced from: commits 2700993