2017-02-16 49 views

回答

2

這已經回答了

Spring MVC @PathVariable getting truncated

Spring MVC @PathVariable with dot (.) is getting truncated

Spring - Path variable truncate after dot - annotation

基本上,這是一個正則表達式。 Spring認爲最後一個點背後的任何東西都是一個擴展,並將其除掉。

如果你有一個映射/somepath/{email},並嘗試/somepath/[email protected]的路徑參數email值將是[email protected]

使用正則表達式{pathparam:+}一切價值的考慮一部分,甚至背後是什麼最後一個點。

+0

感謝您的澄清。它會被回答,但是當我用關鍵詞完全搜索時,我沒有找到任何匹配的答案。 – arjun