美文网首页
url包含点(.)spring mvc的PathVariable

url包含点(.)spring mvc的PathVariable

作者: kittaaron | 来源:发表于2018-05-30 11:47 被阅读0次

发现这个问题是用feign client调用一个服务的时候,发现传过去url值不对,有部分被truncate掉了,直接贴解决办法:

@Component
public class MvcConfig extends WebMvcConfigurerAdapter {
    @Override
    public void configurePathMatch(PathMatchConfigurer matcher) {
        matcher.setUseRegisteredSuffixPatternMatch(true);
    }
}

相关文章

网友评论

      本文标题:url包含点(.)spring mvc的PathVariable

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