骆驼休息 URI 与后缀一起工作



所以我有一个使用Camel的REST网络服务。

它工作得很好,除了如果我用后缀调用我的 URI,我会得到相同的响应而不是 404。

其余配置:

restConfiguration()
.component("restlet")
.bindingMode(RestBindingMode.json) 
.dataFormatProperty("prettyPrint", "true") 
.contextPath(contextPath).host(host).port(port); 
rest("/ressource") .description("ressource")
.consumes("application/json") .produces("application/json") 
.get().outType(Ressource.class)
.to("bean:ressourceImpl?method=getRessource")

例:

本地主机:8090/服务/资源

返回我的资源

本地主机:8090/服务/资源85468461569

返回我的资源

正常吗?我以为它应该只返回 404

是的,

目前不支持此功能。

我已经记录了一张票来改善这一点:https://issues.apache.org/jira/browse/CAMEL-12320

最新更新