美文网首页
Spring Boot配置路径访问忽略大小写

Spring Boot配置路径访问忽略大小写

作者: 彩色帆 | 来源:发表于2018-12-12 09:44 被阅读0次

    参考https://blog.csdn.net/superbeyone/article/details/82798890

    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);

        }

    }

    相关文章

      网友评论

          本文标题:Spring Boot配置路径访问忽略大小写

          本文链接:https://www.haomeiwen.com/subject/rmhuhqtx.html