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 57c986182d4c13d5a7b5650f03eb7fbe5e1d32ee Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon Nov 25 14:45:58 2024 +0100 SQL Kamelets: Disable autowiring by default - SQLServer Source Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- kamelets/sqlserver-source.kamelet.yaml | 6 +++++- .../src/main/resources/kamelets/sqlserver-source.kamelet.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/kamelets/sqlserver-source.kamelet.yaml b/kamelets/sqlserver-source.kamelet.yaml index 314f75f2..076e72b1 100644 --- a/kamelets/sqlserver-source.kamelet.yaml +++ b/kamelets/sqlserver-source.kamelet.yaml @@ -106,6 +106,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sqlserver-source + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -114,7 +118,7 @@ spec: url: 'jdbc:sqlserver://{{serverName}}:{{serverPort}};databaseName={{databaseName}};encrypt={{encrypt}};trustServerCertificate={{trustServerCertificate}};' driverClassName: 'com.microsoft.sqlserver.jdbc.SQLServerDriver' from: - uri: "sql:{{query}}" + uri: "{{local-sqlserver-source}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}" onConsume: "{{?consumedQuery}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/sqlserver-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/sqlserver-source.kamelet.yaml index 314f75f2..076e72b1 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/sqlserver-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/sqlserver-source.kamelet.yaml @@ -106,6 +106,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sqlserver-source + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -114,7 +118,7 @@ spec: url: 'jdbc:sqlserver://{{serverName}}:{{serverPort}};databaseName={{databaseName}};encrypt={{encrypt}};trustServerCertificate={{trustServerCertificate}};' driverClassName: 'com.microsoft.sqlserver.jdbc.SQLServerDriver' from: - uri: "sql:{{query}}" + uri: "{{local-sqlserver-source}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}" onConsume: "{{?consumedQuery}}"