Replacing deprecated beanRef () in Camel v2.16.0

We are upgrading from Camel v2.13 to v2.16 and find that beanRef () is marked as deprecated. What is the replacement / alternative recommended by Apache Camel. I could not find anything useful on the Camel v2.16.0 documentation site. Even updated examples are not yet available.

beanRef () is the syntax in Java DSL Bean The camel language.

+4
source share
3 answers

I assume you are talking about class ProcessorDefinition.

Javadoc comments say use methods bean(...)as replacements for methods beanRef(...).

: https://github.com/apache/camel/blob/6dae060eeec8b49531df5d6828030f4ef037f6eb/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java

+3
from(...).to("bean:beanId?method=myMethod")

from(...).bean("beanId", "myMethod")
+1

beanRef Camel 2.16.3

org.apache.camel.model.ProcessorDefinition. beanRef (String)
ProcessorDefinition.bean(Object)

org.apache.camel.model.ProcessorDefinition. beanRef (String, boolean)
ProcessorDefinition.bean(Object, String, boolean)

org.apache.camel.model.ProcessorDefinition. beanRef (String, String)
ProcessorDefinition.bean(Object, String)

org.apache.camel.model.ProcessorDefinition. beanRef (String, String, boolean)
ProcessorDefinition.bean(Object, String, boolean)

org.apache.camel.model.ProcessorDefinition. beanRef (String, String, boolean, boolean)
multiParameterArray .

: http://static.javadoc.io/org.apache.camel/camel-core/2.16.3/deprecated-list.html

0

Source: https://habr.com/ru/post/1615262/


All Articles