Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
3.0.0
-
None
-
Patch Available
-
Unknown
Description
When using the rest dsl with the following configuration:
restConfiguration().component("netty-http").port(8080) .endpointProperty("matchOnUriPrefix", "true") .apiContextPath("/api-doc").apiProperty("api.title", "Camel Examples Karaf Rest API") .apiProperty("api.version", "1.0.0");
Starting the /api-doc route throws the following error:
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: netty-http://http://localhost:8080/api-doc?httpMethodRestrict=GET&matchOnUriPrefix=true&matchOnUriPrefix=true due to: Error binding property (matchOnUriPrefix=[true, true]) with name: matchOnUriPrefix on bean: org.apache.camel.component.netty.http.NettyHttpConfiguration@2918e3d7 with value: [true, true]
This is because the NettyHttpComponent class hard codes matchOnUriPrefix on this route so it is added twice. This configuration should only be added if it does not already exists.