You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/11/25 14:53:57 UTC
(camel-kamelets) 01/03: SQL Kamelets: Disable autowiring by default - MariaDB Source
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 84f5c2c5c260d853a2460897da09b6cc9a9e9760
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 25 15:27:05 2024 +0100
SQL Kamelets: Disable autowiring by default - MariaDB Source
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
kamelets/mariadb-source.kamelet.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kamelets/mariadb-source.kamelet.yaml b/kamelets/mariadb-source.kamelet.yaml
index 99b4f71d..17d67a3b 100644
--- a/kamelets/mariadb-source.kamelet.yaml
+++ b/kamelets/mariadb-source.kamelet.yaml
@@ -96,6 +96,10 @@ spec:
- "mvn:org.apache.commons:commons-dbcp2:2.12.0"
template:
beans:
+ - name: local-sql-mariadb-source
+ type: "#class:org.apache.camel.component.sql.SqlComponent"
+ properties:
+ autowiredEnabled: "false"
- name: dsBean
type: "#class:org.apache.commons.dbcp2.BasicDataSource"
properties:
@@ -104,7 +108,7 @@ spec:
url: 'jdbc:mariadb://{{serverName}}:{{serverPort}}/{{databaseName}}'
driverClassName: 'org.mariadb.jdbc.Driver'
from:
- uri: "sql:{{query}}"
+ uri: "{{local-sql-mariadb-source}}:{{query}}"
parameters:
dataSource: "#bean:{{dsBean}}"
onConsume: "{{?consumedQuery}}"