What Camel version do you use

On Fri, Feb 24, 2023 at 12:04 PM Arnaud Level <arn...@toro-intl.com> wrote:

> Hi,
>
> We are trying to configure a HTTP handler on our Undertow endpoint:
> rest("/items/{itemId}/colors?handlers=authorizationHandler")
>                 .get("/").to("direct:xxx");
>
> The AuthorizationHandler class
> implements org.apache.camel.component.undertow.CamelUndertowHttpHandler
> Camel throws the following exception at
> start: org.apache.camel.NoSuchBeanException: No bean could be found in the
> registry for: authorizationHandler:/ of type:
> org.apache.camel.component.undertow.CamelUndertowHttpHandler
>
> The bean is created in our Configuration class and *we can find it the
> registry* (in our RouteBuilder class just before the above route is
> defined) with the two following methods:
> CamelUndertowHttpHandler test1 =
>
> getContext().getRegistry().findSingleByType(CamelUndertowHttpHandler.class);
> Object test2 =
> getContext().getRegistry().lookupByName("authorizationHandler");
> So we know the bean is in the registry before the route is defined.
>
> We could not find any examples. Could someone please tell us how handlers
> are supposed to be configured to get them working ?
>
> Thank you in advance!
> Arnaud
>


-- 
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to