From d223e28e936f2dcb753fe891cfa8bd8998b126b3 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 25 Nov 2024 14:47:56 +0100 Subject: [PATCH] SQL Kamelets: Disable autowiring by default - SQLServer Sink Signed-off-by: Andrea Cosentino --- kamelets/sqlserver-sink.kamelet.yaml | 6 +++++- .../src/main/resources/kamelets/sqlserver-sink.kamelet.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/kamelets/sqlserver-sink.kamelet.yaml b/kamelets/sqlserver-sink.kamelet.yaml index 9ac033402..193fab5ae 100644 --- a/kamelets/sqlserver-sink.kamelet.yaml +++ b/kamelets/sqlserver-sink.kamelet.yaml @@ -104,6 +104,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sqlserver-sink + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -118,6 +122,6 @@ spec: json: library: Jackson - to: - uri: "sql:{{query}}" + uri: "{{local-sqlserver-sink}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml index 9ac033402..193fab5ae 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml @@ -104,6 +104,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sqlserver-sink + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -118,6 +122,6 @@ spec: json: library: Jackson - to: - uri: "sql:{{query}}" + uri: "{{local-sqlserver-sink}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}"