So I have a REST webservice using Camel.
it works just fine except that if I call my URI with a suffix I get the same response and not a 404.
Rest Configuration:
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")
Example :
localhost:8090/service/ressource
returns my ressource
localhost:8090/service/ressource85468461569
returns my ressource
Is it normal ? I thought it should just return 404
Yes this is currently not supported.
I have logged a ticket to improve this: https://issues.apache.org/jira/browse/CAMEL-12320