Skip to content

Commit 92f54da

Browse files
committed
Bug fixes in WebMvc.fn testing support
See gh-30477
1 parent 8bca7cd commit 92f54da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-test/src/main/java/org/springframework/test/web/servlet/setup/RouterFunctionMockMvcBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public RouterFunctionMockMvcBuilder setViewResolvers(ViewResolver...resolvers) {
175175
* Atom).
176176
*/
177177
public RouterFunctionMockMvcBuilder setSingleView(View view) {
178-
this.viewResolvers = Collections.<ViewResolver>singletonList(new StaticViewResolver(view));
178+
this.viewResolvers = Collections.singletonList(new StaticViewResolver(view));
179179
return this;
180180
}
181181

@@ -226,7 +226,7 @@ private void registerRouterFunction(StubWebApplicationContext wac) {
226226
ContentNegotiationManager mvcContentNegotiationManager = config.mvcContentNegotiationManager();
227227
wac.addBean("mvcContentNegotiationManager", mvcContentNegotiationManager);
228228

229-
RouterFunctionMapping hm = config.routerFunctionMapping(mvcConversionService, resourceUrlProvider);
229+
RouterFunctionMapping hm = config.getHandlerMapping(mvcConversionService, resourceUrlProvider);
230230
if (sc != null) {
231231
hm.setServletContext(sc);
232232
}

0 commit comments

Comments
 (0)