Java Code Examples for org.springframework.web.servlet.config.annotation.PathMatchConfigurer#setUseSuffixPatternMatch()

The following examples show how to use org.springframework.web.servlet.config.annotation.PathMatchConfigurer#setUseSuffixPatternMatch() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebMVCConfig.java    From spring-boot with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example 2
Source File: SpringMvcConfiguration.java    From junit-servers with MIT License 5 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	UrlPathHelper urlPathHelper = new UrlPathHelper();
	urlPathHelper.setAlwaysUseFullPath(true);

	configurer.setUrlPathHelper(urlPathHelper);
	configurer.setUseSuffixPatternMatch(true);
}
 
Example 3
Source File: SpringMvcConfiguration.java    From junit-servers with MIT License 5 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	UrlPathHelper urlPathHelper = new UrlPathHelper();
	urlPathHelper.setAlwaysUseFullPath(true);

	configurer.setUrlPathHelper(urlPathHelper);
	configurer.setUseSuffixPatternMatch(true);
}
 
Example 4
Source File: SpringMvcConfiguration.java    From junit-servers with MIT License 5 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	UrlPathHelper urlPathHelper = new UrlPathHelper();
	urlPathHelper.setAlwaysUseFullPath(true);

	configurer.setUrlPathHelper(urlPathHelper);
	configurer.setUseSuffixPatternMatch(true);
}
 
Example 5
Source File: RestSpringModuleConfig.java    From herd with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example 6
Source File: PresentationConfiguration.java    From hesperides with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    UrlPathHelper urlPathHelper = new UrlPathHelper();
    urlPathHelper.setUrlDecode(false);
    configurer.setUrlPathHelper(urlPathHelper);
    configurer.setUseSuffixPatternMatch(false); // avoids bug with getInstanceFiles when instance name ends with .digit and it gets mangled
}
 
Example 7
Source File: SpringMvcConfiguration.java    From junit-servers with MIT License 5 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	UrlPathHelper urlPathHelper = new UrlPathHelper();
	urlPathHelper.setAlwaysUseFullPath(true);

	configurer.setUrlPathHelper(urlPathHelper);
	configurer.setUseSuffixPatternMatch(true);
}
 
Example 8
Source File: MyMvcConfig.java    From springMvc4.x-project with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	configurer.setUseSuffixPatternMatch(false);
}
 
Example 9
Source File: MvcConfigurer.java    From servicecomb-pack with Apache License 2.0 4 votes vote down vote up
@Override  
public void configurePathMatch(PathMatchConfigurer configurer) {
    super.configurePathMatch(configurer);  
    configurer.setUseSuffixPatternMatch(false);  
}
 
Example 10
Source File: AlfrescoMvcServletConfigModuleConfiguration.java    From alfresco-mvc with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	configurer.setUseSuffixPatternMatch(false);
}
 
Example 11
Source File: ServletConfiguration.java    From airsonic with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(true);
}
 
Example 12
Source File: MyMvcConfig.java    From springMvc4.x-project with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	configurer.setUseSuffixPatternMatch(false);
}
 
Example 13
Source File: TestController.java    From aws-serverless-java-container with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}
 
Example 14
Source File: MVCConfig.java    From elucidate-server with MIT License 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseTrailingSlashMatch(false);
    configurer.setUseSuffixPatternMatch(false);
}
 
Example 15
Source File: MyMvcConfig.java    From springMvc4.x-project with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	configurer.setUseSuffixPatternMatch(false);
}
 
Example 16
Source File: AlfrescoMvcCustomServletConfigModuleConfiguration.java    From alfresco-mvc with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	configurer.setUseSuffixPatternMatch(false);
}
 
Example 17
Source File: WebMvcAutoConfiguration.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void configurePathMatch(final PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
    configurer.setUseRegisteredSuffixPatternMatch(false);
}
 
Example 18
Source File: MyMvcConfig.java    From springMvc4.x-project with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	configurer.setUseSuffixPatternMatch(false);
}
 
Example 19
Source File: MyMvcConfig.java    From springMvc4.x-project with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
	configurer.setUseSuffixPatternMatch(false);
}
 
Example 20
Source File: WebMvcConfiguration.java    From multiapps-controller with Apache License 2.0 4 votes vote down vote up
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
    configurer.setUseSuffixPatternMatch(false);
}