【发布时间】:2012-08-22 17:27:03
【问题描述】:
我正在尝试在 restFul Web 服务 URL 的末尾添加一个参数。
使用 Spring3
@RequestMapping(value="/searchForXmlFormat/{lastName}*?format=xml"* ,headers="Accept=application/atom+xml",method=RequestMethod.GET)
我想得到这样的东西:
rest/name/abcd?format=xml
或
rest/name/abcd?format=json.
我有获取 JSON /XML 格式数据的代码。我需要弄清楚如何在末尾添加?format=xml 或?format=json。
【问题讨论】:
-
@RequestMapping 向我建议您正在使用一些特定的框架......我们能知道是哪一个吗?