Possible Duplicate:
Spring 3 RequestMapping: Get path value
在春天,有办法在下述URL中捕获rest/of/the/url
:
/myapp/foo/bar/rest/of/the/url
采用@Request • 绘制这方面的说明:
@RequestMapping(value="{appname}/{path1}/{path2}/{remainder}")
public String myRequestMethod(
@PathVariable("appname") String appName,
PathVariable("path1") String path1,
PathVariable("path2") String path2,
PathVariable("remainder") String remainder)
我谨请求这样做。
{appname} -> myapp
{path1} -> foo
{path2} -> bar
{remainder} -> rest/of/the/url
http://static.childrensource.org/children/docs/3.0.x/javadoc-api/org/childrenframework/web/bind/annotation/RequestMapping.html 请求 地图上有一个关于使用另一种定期表述的说明:
否则,URI模板将与经常表述[签字]相匹配。 (即除期限外的任何特性),但可以通过具体说明另一种定期表述加以改变:旅馆/旅馆:d+}
但是,当我使用类似请求时(我收到404份):情况并非如此。
@RequestMapping(value="{appname}/{path1}/{path2}/{remainder:.[\S]*}")
Does anyone know how to match the rest of an URL with a Spring RequestMapping?