This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 6a80ff417c Add documentation for autowiring behaviour with default 
beans
6a80ff417c is described below

commit 6a80ff417cf5048dbdc5f85b06eb572417d149f8
Author: James Netherton <jamesnether...@gmail.com>
AuthorDate: Wed Jun 11 08:38:13 2025 +0100

    Add documentation for autowiring behaviour with default beans
---
 docs/modules/ROOT/pages/user-guide/configuration.adoc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/docs/modules/ROOT/pages/user-guide/configuration.adoc 
b/docs/modules/ROOT/pages/user-guide/configuration.adoc
index bc7998f78b..063b8622c4 100644
--- a/docs/modules/ROOT/pages/user-guide/configuration.adoc
+++ b/docs/modules/ROOT/pages/user-guide/configuration.adoc
@@ -129,6 +129,15 @@ In case autowiring is performed for some component option, 
you should see a simi
 Autowired property: exchangeFormatter on component: log as exactly one 
instance of type: software.amazon.org.apache.camel.spi.ExchangeFormatter 
(org.apache.camel.support.processor.DefaultExchangeFormatter) found in the 
registry
 ----
 
+=== Default beans and Camel component autowiring
+
+Quarkus has the concept of 
https://quarkus.io/guides/cdi-reference#default_beans[Default beans].
+Many Quarkus extensions produce CDI beans for types that can be autowired into 
Camel components.
+Default beans always take priority for Camel component autowiring, when there 
are multiple beans for the same target type.
+
+For example, Quarkus JDBC driver and Hibernate ORM extensions allow you to 
configure applications with both 'default' and 'named' configurations.
+Without explicitly specifying which `DataSource` or `EntityManagerFactory` you 
want to work with via endpoint URI options, the default bean for those types 
will take priority for autowiring.
+
 == What's next?
 
 We recommend to continue with xref:user-guide/cdi.adoc[CDI].

Reply via email to