This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 88df6b9 Update docs 88df6b9 is described below commit 88df6b954817a04bbe59ee4d8a49f41ebcba82a0 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Jun 9 21:04:35 2020 +0200 Update docs --- .../faq/pages/how-do-i-configure-endpoints.adoc | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/user-manual/modules/faq/pages/how-do-i-configure-endpoints.adoc b/docs/user-manual/modules/faq/pages/how-do-i-configure-endpoints.adoc index 0063600..63afc21 100644 --- a/docs/user-manual/modules/faq/pages/how-do-i-configure-endpoints.adoc +++ b/docs/user-manual/modules/faq/pages/how-do-i-configure-endpoints.adoc @@ -138,27 +138,41 @@ Registry. Camel also supports to refer to beans by their class type. -[[HowdoIconfigureendpoints-ReferringbeansbytypefromEndpointURIs]] -=== Referring beans by type from Endpoint URIs +[[HowdoIconfigureendpoints-ReferringbeansbyclassfromEndpointURIs]] +=== Referring beans by class from Endpoint URIs -When configuring endpoints using URI syntax you can now refer to bean by type (class name) -using the `#type:fullyQualifiedName` notation. +When configuring endpoints using URI syntax you can now refer to bean by its class name +using the `#class:fullyQualifiedName` notation. -If the parameter value starts with a `#type:` sign then Camel will load the +If the parameter value starts with a `#class:` sign then Camel will load the class with the given name, and create an instanace of the bean using its _no-arg_ constructor: [source] ---- -file://inbox?sorter=#type:com.foo.MySpecialSorter +file://inbox?sorter=#class:com.foo.MySpecialSorter ---- -If you need to provide parameters to the constructor, then you should use `#class:` notation instead: +If you need to provide parameters to the constructor, then this is also possible +(limited to numbers, boolean, literal, and null values) [source] ---- file://inbox?sorter=#class:com.foo.MySpecialSorter(10, 'Hello world', true) ---- +[[HowdoIconfigureendpoints-ReferringbeansbytypefromEndpointURIs]] +=== Referring beans by type from Endpoint URIs + +When configuring endpoints using URI syntax you can now refer to bean by its type which +are used to lookup the bean by the given type from the xref:pages::registry.adoc[Registry]. +If there is one bean found in the registry of the given type, then that bean instance will be used; +otherwise an exception is thrown. + +[source] +---- +file://inbox?idempontentRepository=#type:org.apache.camel.spi.IdempotentRepository +---- + [[HowdoIconfigureendpoints-Configuringparametervaluesusingrawvalues,egsuchaspasswords]] === Configuring parameter values using raw values, eg such as passwords