[
https://issues.apache.org/jira/browse/CAMEL-15483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17188144#comment-17188144
]
Ganesh commented on CAMEL-15483:
--------------------------------
{code:java}
@Test
public void testBindBeans() throws Exception {
MyFoo myFoo = new MyFoo();
Main main = new Main();
main.configure().addRoutesBuilder(new MyRouteBuilder());
main.addProperty("camel.beans.company[name]", "Acme");
main.addProperty("camel.beans.company[country]", "USA");
main.addProperty("camel.beans.company[zip]", "92010");
main.start();
CamelContext camelContext = main.getCamelContext();
assertNotNull(camelContext);
Object mapObj = camelContext.getRegistry().lookupByName("company");
assertNotNull(mapObj); // But the registry has three maps with keys
"company[name]", "company[country]", "company[zip]"{code}
!camel-beans-registry.png!
> Camel-main - Update the bean documentation
> ------------------------------------------
>
> Key: CAMEL-15483
> URL: https://issues.apache.org/jira/browse/CAMEL-15483
> Project: Camel
> Issue Type: Task
> Components: documentation
> Affects Versions: 3.3.0
> Reporter: Ganesh
> Priority: Minor
> Attachments: camel-beans-registry.png
>
>
> The camel bean docs needs to be little bit updated,
> https://camel.apache.org/components/latest/others/main.html#_defining_a_map_bean
>
> Bean reference is missing
>
> {code:java}
> camel.beans.foo.company[name] = Acme
> camel.beans.foo.company[country] = USA
> camel.beans.foo.company[zip] = 92010{code}
>
> where 'foo' is the bean reference name.
> https://camel.apache.org/components/latest/others/main.html#_defining_a_list_bean
> camel.beans.foo.projects[0] = Camel
> camel.beans.foo.projects[1] = Kafka
> camel.beans.foo.projects[2] = Quarkus
--
This message was sent by Atlassian Jira
(v8.3.4#803005)