From 0d6e3000e588d14a10ef42790ad1e42c5dc00bec Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 25 Nov 2024 15:35:26 +0100 Subject: [PATCH] SQL Kamelets: Disable autowiring by default - MariaDB Sink Signed-off-by: Andrea Cosentino --- kamelets/mariadb-sink.kamelet.yaml | 6 +++++- .../src/main/resources/kamelets/mariadb-sink.kamelet.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/kamelets/mariadb-sink.kamelet.yaml b/kamelets/mariadb-sink.kamelet.yaml index 2d8c15b5e..c1ac66d4c 100644 --- a/kamelets/mariadb-sink.kamelet.yaml +++ b/kamelets/mariadb-sink.kamelet.yaml @@ -94,6 +94,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sql-mariadb-sink + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -108,6 +112,6 @@ spec: json: library: Jackson - to: - uri: "sql:{{query}}" + uri: "{{local-sql-mariadb-sink}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/mariadb-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/mariadb-sink.kamelet.yaml index 2d8c15b5e..c1ac66d4c 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/mariadb-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/mariadb-sink.kamelet.yaml @@ -94,6 +94,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sql-mariadb-sink + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -108,6 +112,6 @@ spec: json: library: Jackson - to: - uri: "sql:{{query}}" + uri: "{{local-sql-mariadb-sink}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}"