/** * Return a global {@link UrlPathHelper} instance for path matching * patterns in {@link HandlerMapping HandlerMappings}. * This instance can be configured using the {@link PathMatchConfigurer} * in {@link #configurePathMatch(PathMatchConfigurer)}. * @since 4.1 */ @Bean public UrlPathHelper mvcUrlPathHelper() { UrlPathHelper pathHelper = getPathMatchConfigurer().getUrlPathHelper(); return (pathHelper != null ? pathHelper : new UrlPathHelper()); }
/** * Return a global {@link UrlPathHelper} instance for path matching * patterns in {@link HandlerMapping HandlerMappings}. * This instance can be configured using the {@link PathMatchConfigurer} * in {@link #configurePathMatch(PathMatchConfigurer)}. * @since 4.1 */ @Bean public UrlPathHelper mvcUrlPathHelper() { UrlPathHelper pathHelper = getPathMatchConfigurer().getUrlPathHelper(); return (pathHelper != null ? pathHelper : new UrlPathHelper()); }
/** * A {@link ResourceUrlProvider} bean for use with the MVC dispatcher. * @since 4.1 */ @Bean public ResourceUrlProvider mvcResourceUrlProvider() { ResourceUrlProvider urlProvider = new ResourceUrlProvider(); UrlPathHelper pathHelper = getPathMatchConfigurer().getUrlPathHelper(); if (pathHelper != null) { urlProvider.setUrlPathHelper(pathHelper); } PathMatcher pathMatcher = getPathMatchConfigurer().getPathMatcher(); if (pathMatcher != null) { urlProvider.setPathMatcher(pathMatcher); } return urlProvider; }
/** * A {@link ResourceUrlProvider} bean for use with the MVC dispatcher. * @since 4.1 */ @Bean public ResourceUrlProvider mvcResourceUrlProvider() { ResourceUrlProvider urlProvider = new ResourceUrlProvider(); UrlPathHelper pathHelper = getPathMatchConfigurer().getUrlPathHelper(); if (pathHelper != null) { urlProvider.setUrlPathHelper(pathHelper); } PathMatcher pathMatcher = getPathMatchConfigurer().getPathMatcher(); if (pathMatcher != null) { urlProvider.setPathMatcher(pathMatcher); } return urlProvider; }
UrlPathHelper pathHelper = configurer.getUrlPathHelper(); if (pathHelper != null) { mapping.setUrlPathHelper(pathHelper);
UrlPathHelper pathHelper = configurer.getUrlPathHelper(); if (pathHelper != null) { mapping.setUrlPathHelper(pathHelper);
public void configurePathMatch(PathMatchConfigurer configurer) { UrlPathHelper urlPathHelper = configurer.getUrlPathHelper(); if (null == urlPathHelper){ urlPathHelper = new UrlPathHelper(); } urlPathHelper.setRemoveSemicolonContent(false); configurer.setUrlPathHelper(urlPathHelper); }
@Override public void configurePathMatch(PathMatchConfigurer configurer) { // Force MVC to use /restng endpoint. If we need something more advanced, we should make a // custom PathHelper configurer.setUrlPathHelper(new GeoServerUrlPathHelper()); configurer.getUrlPathHelper().setAlwaysUseFullPath(true); }
handlerMapping.setPathMatcher(configurer.getPathMatcher()); if (configurer.getUrlPathHelper() != null) { handlerMapping.setUrlPathHelper(configurer.getUrlPathHelper());