Fix failing test
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.springframework.web.servlet.config.annotation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -321,8 +322,11 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
*/
|
||||
@Bean
|
||||
public ResourceUrlGenerator resourceUrlGenerator() {
|
||||
SimpleUrlHandlerMapping hm = (SimpleUrlHandlerMapping) resourceHandlerMapping();
|
||||
return new ResourceUrlGenerator(hm.getUrlMap());
|
||||
Map<String, ?> handlerMap = Collections.<String, Object>emptyMap();
|
||||
if (resourceHandlerMapping() instanceof SimpleUrlHandlerMapping) {
|
||||
handlerMap = ((SimpleUrlHandlerMapping) resourceHandlerMapping()).getUrlMap();
|
||||
}
|
||||
return new ResourceUrlGenerator(handlerMap);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user