【发布时间】:2016-01-05 15:22:55
【问题描述】:
如何访问 Apache Camel Rest 模块中的 PathVariables?
我定义了这样的路由(遵循documentation 中的“使用基本路径”):
rest("/customers/")
.get("/{id}").to("direct:customerDetail")
我怎样才能在以下路由中保留{id}-参数?
基本上我想知道骆驼提供什么而不是@PathVariable(见以下示例)
@RequestMapping(value="/customers/{id}", method = RequestMethod.GET)
public Customer customerDetail(@PathVariable String cId) {
return getCustomer(cId);
}
【问题讨论】:
标签: java web-services rest apache-camel