Java DSL에는 구성 요소에 대한 syntactic sugar가 포함되어 있습니다. 빈을 끝점으로 명시적으로 지정하는 대신 다음 구문을 사용할 수 있습니다.
// Send message to the bean endpoint
// and invoke method resolved using Bean Binding.
from("direct:start").bean("beanName");
// Send message to the bean endpoint
// and invoke given method.
from("direct:start").bean("beanName", "methodName");
// Send message to the bean endpoint
// and invoke method resolved using Bean Binding.
from("direct:start").bean("beanName");
// Send message to the bean endpoint
// and invoke given method.
from("direct:start").bean("beanName", "methodName");
Copy to ClipboardCopied!Toggle word wrapToggle overflow
console에 대한 참조 이름을 전달하는 대신, Camel이 레지스트리에서 조회할 수 있도록 해당 참조 자체를 지정할 수 있습니다.
// Send message to the given bean instance.
from("direct:start").bean(new ExampleBean());
// Explicit selection of bean method to be invoked.
from("direct:start").bean(new ExampleBean(), "methodName");
// Camel will create the instance of bean and cache it for you.
from("direct:start").bean(ExampleBean.class);
// Send message to the given bean instance.
from("direct:start").bean(new ExampleBean());
// Explicit selection of bean method to be invoked.
from("direct:start").bean(new ExampleBean(), "methodName");
// Camel will create the instance of bean and cache it for you.
from("direct:start").bean(ExampleBean.class);
Copy to ClipboardCopied!Toggle word wrapToggle overflow