Spring boot路径匹配配置
作者:
青丝如梦 | 来源:发表于
2018-11-09 10:47 被阅读0次package com.test;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
@Configuration
public class UrlMatchConfig extends WebMvcConfigurationSupport {
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
//setUseSuffixPatternMatch 自动过滤后缀'.do'
//setUseTrailingSlashMatch 自动去掉'/'
configurer
.setUseSuffixPatternMatch(true)
.setUseTrailingSlashMatch(true);
}
}
本文标题:Spring boot路径匹配配置
本文链接:https://www.haomeiwen.com/subject/rnxgxqtx.html
网友评论