Skip to content

Commit

Permalink
SQL Kamelets: Disable autowiring by default - Postgres Sink
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
  • Loading branch information
oscerd committed Nov 25, 2024
1 parent 5399396 commit 398ae3f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
6 changes: 5 additions & 1 deletion kamelets/postgresql-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ spec:
- "mvn:org.apache.commons:commons-dbcp2:2.12.0"
template:
beans:
- name: local-sql-postgres-sink
type: "#class:org.apache.camel.component.sql.SqlComponent"
properties:
autowiredEnabled: "false"
- name: dsBean
type: "#class:org.apache.commons.dbcp2.BasicDataSource"
properties:
Expand All @@ -105,6 +109,6 @@ spec:
json:
library: Jackson
- to:
uri: "sql:{{query}}"
uri: "{{local-sql-postgres-sink}}:{{query}}"
parameters:
dataSource: "#bean:{{dsBean}}"
4 changes: 2 additions & 2 deletions kamelets/postgresql-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ spec:
- "mvn:org.apache.commons:commons-dbcp2:2.12.0"
template:
beans:
- name: local-sql-postgres
- name: local-sql-postgres-source
type: "#class:org.apache.camel.component.sql.SqlComponent"
properties:
autowiredEnabled: "false"
Expand All @@ -105,7 +105,7 @@ spec:
url: 'jdbc:postgresql://{{serverName}}:{{serverPort}}/{{databaseName}}'
driverClassName: 'org.postgresql.Driver'
from:
uri: "{{local-sql-postgres}}:{{query}}"
uri: "{{local-sql-postgres-source}}:{{query}}"
parameters:
dataSource: "#bean:{{dsBean}}"
onConsume: "{{?consumedQuery}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ spec:
- "mvn:org.apache.commons:commons-dbcp2:2.12.0"
template:
beans:
- name: local-sql-postgres-sink
type: "#class:org.apache.camel.component.sql.SqlComponent"
properties:
autowiredEnabled: "false"
- name: dsBean
type: "#class:org.apache.commons.dbcp2.BasicDataSource"
properties:
Expand All @@ -105,6 +109,6 @@ spec:
json:
library: Jackson
- to:
uri: "sql:{{query}}"
uri: "{{local-sql-postgres-sink}}:{{query}}"
parameters:
dataSource: "#bean:{{dsBean}}"
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ spec:
- "mvn:org.apache.commons:commons-dbcp2:2.12.0"
template:
beans:
- name: local-sql-postgres
- name: local-sql-postgres-source
type: "#class:org.apache.camel.component.sql.SqlComponent"
properties:
autowiredEnabled: "false"
Expand All @@ -105,7 +105,7 @@ spec:
url: 'jdbc:postgresql://{{serverName}}:{{serverPort}}/{{databaseName}}'
driverClassName: 'org.postgresql.Driver'
from:
uri: "{{local-sql-postgres}}:{{query}}"
uri: "{{local-sql-postgres-source}}:{{query}}"
parameters:
dataSource: "#bean:{{dsBean}}"
onConsume: "{{?consumedQuery}}"
Expand Down

0 comments on commit 398ae3f

Please sign in to comment.