Spring Boot配置路径访问忽略大小写
作者:互联网
import org.springframework.context.annotation.Configuration;
import org.springframework.util.AntPathMatcher;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
@Configuration
public class WebConfig extends WebMvcConfigurationSupport {
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
AntPathMatcher matcher = new AntPathMatcher();
matcher.setCaseSensitive(false);
configurer.setPathMatcher(matcher);
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
标签:matcher,Spring,Boot,springframework,大小写,AntPathMatcher,org,import,annotation 来源: https://blog.csdn.net/zhongguowangzhan/article/details/113331061