Java 类org.springframework.web.servlet.config.annotation.PathMatchConfigurer 实例源码

项目:dynamic-data-source-demo    文件:SpringMvcConfig.java   
/**
 * 设置路径匹配
 */
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer
            //设置是否是后缀模式匹配,如"/user"是否匹配"/user.*",默认true
            .setUseSuffixPatternMatch(false)
            //设置是否自动后缀路径模式匹配,如"/user"是否匹配"/user/",默认true
            .setUseTrailingSlashMatch(true);
}
项目:xm-commons    文件:XmWebMvcConfigurerAdapter.java   
/**
 * {@inheritDoc}
 */
@Override
public final void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);

    xmConfigurePathMatch(configurer);
}
项目:interview-preparation    文件:DispatchServletConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    super.configurePathMatch(configurer);
    configurer.setUseSuffixPatternMatch(false);// /hello/1-2 and /hello/1-2.1 are not same
    configurer.setUseTrailingSlashMatch(true); // /hello/ and /hello are same

}
项目:spring-boot    文件:WebMVCConfig.java   
/**
 * PathMatchConfigurer 函数让开发人员可以根据需求定制URL路径的匹配规则。
 *
 * @param configurer
 */
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    /**
     * spring mvc 默认忽略 url 中点"."后面的部分,如
     * http://localhost:8080/abc.mm  会直接匹配为
     * http://localhost:8080/abc 忽略了 mm
     * 如果不想忽略,设置 setUseSuffixPatternMatch(false)
     */

    configurer.setUseSuffixPatternMatch(false);
}
项目:spring-boot    文件:WebMVCConfig.java   
/**
 * PathMatchConfigurer 函数让开发人员可以根据需求定制URL路径的匹配规则。
 *
 * @param configurer
 */
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    /**
     * spring mvc 默认忽略 url 中点"."后面的部分,如
     * http://localhost:8080/abc.mm  会直接匹配为
     * http://localhost:8080/abc 忽略了 mm
     * 如果不想忽略,设置 setUseSuffixPatternMatch(false)
     */

    configurer.setUseSuffixPatternMatch(false);
}
项目:WQP-WQX-Services    文件:SpringConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    //This should make the url case insensitive
    AntPathMatcher matcher = new AntPathMatcher();
    matcher.setCaseSensitive(false);
    configurer.setPathMatcher(matcher);
}
项目:herd    文件:RestSpringModuleConfig.java   
/**
 * Configure the path match by disabling suffix pattern matching.
 *
 * @param configurer the path match configurer.
 */
@Override
public void configurePathMatch(PathMatchConfigurer configurer)
{
    // Turn off suffix pattern matching which will ensure REST URL's that end with periods and some other text get matched in full and not without
    // the period and the following text suffix. This is due to Spring's extension suffix matching logic that we don't need and don't want
    // (e.g. .txt could be parsed by a specific handler).
    configurer.setUseSuffixPatternMatch(false);
}
项目:chassis    文件:SpringMvcConfiguration.java   
/**
 * Return a {@link RequestMappingHandlerMapping} ordered at 0 for mapping
 * requests to annotated controllers.
 */
@Bean
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
    PathMatchConfigurer configurer = new PathMatchConfigurer();
    configurePathMatch(configurer);
    RequestMappingHandlerMapping handlerMapping = new RequestMappingHandlerMapping();
    handlerMapping.setOrder(0);
    handlerMapping.setDetectHandlerMethodsInAncestorContexts(true);
    handlerMapping.setInterceptors(getInterceptors());
    handlerMapping.setContentNegotiationManager(mvcContentNegotiationManager());
    if (configurer.isUseSuffixPatternMatch() != null) {
        handlerMapping.setUseSuffixPatternMatch(configurer.isUseSuffixPatternMatch());
    }
    if (configurer.isUseRegisteredSuffixPatternMatch() != null) {
        handlerMapping.setUseRegisteredSuffixPatternMatch(configurer.isUseRegisteredSuffixPatternMatch());
    }
    if (configurer.isUseTrailingSlashMatch() != null) {
        handlerMapping.setUseTrailingSlashMatch(configurer.isUseTrailingSlashMatch());
    }
    if (configurer.getPathMatcher() != null) {
        handlerMapping.setPathMatcher(configurer.getPathMatcher());
    }
    if (configurer.getUrlPathHelper() != null) {
        handlerMapping.setUrlPathHelper(configurer.getUrlPathHelper());
    }
    return handlerMapping;
}
项目:xm-commons    文件:TimelineConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:xm-ms-dashboard    文件:WebMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:FeedbackCollectionAndMgmtSystem    文件:AppConfig.java   
/**Optional. It's only required when handling '.' in @PathVariables which otherwise ignore everything after last '.' in @PathVaidables argument.
 * It's a known bug in Spring [https://jira.spring.io/browse/SPR-6164], still present in Spring 4.1.7.
 * This is a workaround for this issue.
 */
@Override
public void configurePathMatch(PathMatchConfigurer matcher) {
    matcher.setUseRegisteredSuffixPatternMatch(true);
}
项目:xm-ms-entity    文件:WebMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:springMvc4.x-project    文件:MyMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:springMvc4.x-project    文件:MyMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:springMvc4.x-project    文件:MyMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:springMvc4.x-project    文件:MyMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:springMvc4.x-project    文件:MyMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:springMvc4.x-project    文件:MyMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:xm-ms-config    文件:WebMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:openmrs-contrib-addonindex    文件:WebMvcConfiguration.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    // Fix handling of /api/v1/addon/org.openmrs.module.appui (otherwise appui is treated as a file extension)
    configurer.setUseRegisteredSuffixPatternMatch(true);
}
项目:NGB-master    文件:AppMVCConfiguration.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    super.configurePathMatch(configurer);
    configurer.setUseSuffixPatternMatch(false);
}
项目:atsea-sample-shop-app    文件:WebConfiguration.java   
@Override
   public void configurePathMatch(PathMatchConfigurer configurer) {
    AntPathMatcher matcher = new AntPathMatcher();
    matcher.setCaseSensitive(false);
        configurer.setPathMatcher(matcher);
}
项目:service-authorization    文件:WebMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:elucidate-server    文件:MVCConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseTrailingSlashMatch(false);
    configurer.setUseSuffixPatternMatch(false);
}
项目:nikita-noark5-core    文件:AppWebMvcConfiguration.java   
@Override
public void configurePathMatch(final PathMatchConfigurer configurer) {
    //configurer.setUseSuffixPatternMatch(false);
    configurer.setUseTrailingSlashMatch(true);
}
项目:NGB    文件:AppMVCConfiguration.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    super.configurePathMatch(configurer);
    configurer.setUseSuffixPatternMatch(false);
}
项目:credhub    文件:WebMvcConfiguration.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
  configurer.setUseSuffixPatternMatch(false);
}
项目:putput    文件:WebConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
  configurer.setUseSuffixPatternMatch(false);
}
项目:blog-java2    文件:WebConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
项目:switchman    文件:Web.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
  configurer.setUseTrailingSlashMatch(true);
}
项目:hawkbit    文件:WebMvcAutoConfiguration.java   
@Override
public void configurePathMatch(final PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
    configurer.setUseRegisteredSuffixPatternMatch(false);
}
项目:Pilincs    文件:WebMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    UrlPathHelper urlPathHelper = new UrlPathHelper();
    urlPathHelper.setRemoveSemicolonContent(false);
    configurer.setUrlPathHelper(urlPathHelper);
}
项目:come2help    文件:WebConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    // Spring MVC by default uses the last dot in the URL as file type separator (e.g.:  xxx.xml).
    // To allow domain names as part of the URL we need switch of this behaviour.
    configurer.setUseSuffixPatternMatch(false);
}
项目:orchestrator    文件:WebMvcConfig.java   
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
  configurer.setUseSuffixPatternMatch(false);
  configurer.setUseTrailingSlashMatch(true);
  super.configurePathMatch(configurer);
}
项目:freezo    文件:AdminConfiguration.java   
@Override
public void configurePathMatch(final PathMatchConfigurer configurer)
{
    configurer.setUseRegisteredSuffixPatternMatch(true);
}
项目:xm-commons    文件:XmWebMvcConfigurerAdapter.java   
/**
 * Helps with configuring HandlerMappings path matching options such as trailing slash match,
 * suffix registration, path matcher and path helper.
 * Configured path matcher and path helper instances are shared for:
 * <ul>
 * <li>RequestMappings</li>
 * <li>ViewControllerMappings</li>
 * <li>ResourcesMappings</li>
 * </ul>
 *
 * @see WebMvcConfigurer#configurePathMatch(org.springframework.web.servlet.config.annotation.PathMatchConfigurer)
 */
protected abstract void xmConfigurePathMatch(PathMatchConfigurer configurer);
项目:metacat    文件:ApiConfig.java   
/**
 * {@inheritDoc}
 * <p>
 * Turn off {@literal .} recognition in paths. Needed due to table's name potentially having '.' as character.
 *
 * @see <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html">SpringDoc</a>
 */
@Override
public void configurePathMatch(final PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}