驼色URI带有后缀 [英] Camel rest URI works with suffix

查看:87
本文介绍了驼色URI带有后缀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个使用Camel的REST Web服务.

So I have a REST webservice using Camel.

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

it works just fine except that if I call my URI with a suffix I get the same response and not a 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")

示例:

localhost:8090/service/ressource

localhost:8090/service/ressource

返回我的资源

localhost:8090/service/ressource85468461569

localhost:8090/service/ressource85468461569

返回我的资源

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

Is it normal ? I thought it should just return 404

推荐答案

是的,当前不支持.

我已记录了故障单以改善此问题: https://issues.apache. org/jira/browse/CAMEL-12320

I have logged a ticket to improve this: https://issues.apache.org/jira/browse/CAMEL-12320

这篇关于驼色URI带有后缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆