带有点(.)的Spring MVC @PathVariable被截断 [英] Spring MVC @PathVariable with dot (.) is getting truncated

查看:106
本文介绍了带有点(.)的Spring MVC @PathVariable被截断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是问题的继续 Spring MVC @PathVariable被截断

Spring论坛声明它已作为ContentNegotiationManager的一部分进行了修复(3.2版本).请参阅下面的链接.
https://jira.springsource.org/browse/SPR-6164
https://jira.springsource.org/browse/SPR-7632

Spring forum states that it has fixed(3.2 version) as part of ContentNegotiationManager. see the below link.
https://jira.springsource.org/browse/SPR-6164
https://jira.springsource.org/browse/SPR-7632

在我的应用程序中,带有.com的requestParameter被截断了.

In my application requestParameter with .com is truncated.

有人可以向我解释如何使用此新功能吗?如何在xml上进行配置?

Could anyone explain me how to use this new feature? how is it configurable at xml?

注意:

Note: spring forum- #1 Spring MVC @PathVariable with dot (.) is getting truncated

推荐答案

据我所知,此问题仅针对requestmapping末尾的pathvariable出现.

As far as i know this issue appears only for the pathvariable at the end of the requestmapping.

我们能够通过在requestmapping中定义regex插件来解决这个问题.

We were able to solve that by defining the regex addon in the requestmapping.

 /somepath/{variable:.+}

这篇关于带有点(.)的Spring MVC @PathVariable被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆