/** * Return a global {@link PathMatcher} 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 PathMatcher mvcPathMatcher() { PathMatcher pathMatcher = getPathMatchConfigurer().getPathMatcher(); return (pathMatcher != null ? pathMatcher : new AntPathMatcher()); }
/** * Return a global {@link PathMatcher} 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 PathMatcher mvcPathMatcher() { PathMatcher pathMatcher = getPathMatchConfigurer().getPathMatcher(); return (pathMatcher != null ? pathMatcher : new AntPathMatcher()); }
/** * 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; }
mapping.setUrlPathHelper(pathHelper); PathMatcher pathMatcher = configurer.getPathMatcher(); if (pathMatcher != null) { mapping.setPathMatcher(pathMatcher);
mapping.setUrlPathHelper(pathHelper); PathMatcher pathMatcher = configurer.getPathMatcher(); if (pathMatcher != null) { mapping.setPathMatcher(pathMatcher);
handlerMapping.setUseTrailingSlashMatch(configurer.isUseTrailingSlashMatch()); if (configurer.getPathMatcher() != null) { handlerMapping.setPathMatcher(configurer.getPathMatcher());