本文整理汇总了Java中org.springframework.web.servlet.config.annotation.PathMatchConfigurer.setUseSuffixPatternMatch方法的典型用法代码示例。如果您正苦于以下问题:Java PathMatchConfigurer.setUseSuffixPatternMatch方法的具体用法?Java PathMatchConfigurer.setUseSuffixPatternMatch怎么用?Java PathMatchConfigurer.setUseSuffixPatternMatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.web.servlet.config.annotation.PathMatchConfigurer
的用法示例。
在下文中一共展示了PathMatchConfigurer.setUseSuffixPatternMatch方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public final void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false);
xmConfigurePathMatch(configurer);
}
示例2: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@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
}
示例3: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
/**
* 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);
}
示例4: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
/**
* 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);
}
示例5: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false);
}
示例6: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false);
}
示例7: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
super.configurePathMatch(configurer);
configurer.setUseSuffixPatternMatch(false);
}
示例8: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseTrailingSlashMatch(false);
configurer.setUseSuffixPatternMatch(false);
}
示例9: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false);
}
示例10: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@Override
public void configurePathMatch(final PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false);
configurer.setUseRegisteredSuffixPatternMatch(false);
}
示例11: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@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);
}
示例12: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false);
configurer.setUseTrailingSlashMatch(true);
super.configurePathMatch(configurer);
}
示例13: configurePathMatch
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; //导入方法依赖的package包/类
/**
* {@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);
}