List of usage examples for org.springframework.web.servlet.handler SimpleUrlHandlerMapping setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
From source file:ch.rasc.wampspring.config.WebMvcWampEndpointRegistry.java
/** * Return a handler mapping with the mapped ViewControllers; or {@code null} in case * of no registrations.//from www .ja v a2 s . c om */ public AbstractHandlerMapping getHandlerMapping() { Map<String, Object> urlMap = new LinkedHashMap<>(); for (WebMvcWampWebSocketEndpointRegistration registration : this.registrations) { MultiValueMap<HttpRequestHandler, String> mappings = registration.getMappings(); for (HttpRequestHandler httpHandler : mappings.keySet()) { for (String pattern : mappings.get(httpHandler)) { urlMap.put(pattern, httpHandler); } } } SimpleUrlHandlerMapping hm = new SimpleUrlHandlerMapping(); hm.setUrlMap(urlMap); hm.setOrder(this.order); if (this.urlPathHelper != null) { hm.setUrlPathHelper(this.urlPathHelper); } return hm; }