Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.14.0
-
None
-
ALL
-
Moderate
Description
If we had the same path with different verbs (GET, POST, DELETE) only one is randomly choosen.
To reproduce this issue i just changed the route builder in camel-example-servlet-rest-tomcat.
In UserRouteBuilder.java change the last statement of configure() method with :
rest("/user").description("User rest service")
.consumes("application/json").produces("application/json")
.get("/name").description("GET").outTypeList(User.class)
.to("bean:userService?method=listUsers")
.post("/name").description("POST").to("bean:userService?method=listUsers")
.delete("/
").description("DELETE").to("bean:userService?method=listUsers")
;
After a quick debug it seams that the CamelServlet is fiiling a map of HttpConsumer. The key is path so only last one can be used further.
Attachments
Issue Links
- is blocked by
-
CAMEL-8422 Rest DSL not resolving same endpoint with different methods
- Closed
- is related to
-
CAMEL-7899 camel-jetty should support to define multiple http method for the rest service
- Resolved