Details
-
Task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.20.2
-
None
-
Unknown
Description
There are several examples missing in jdbc component documentation:
https://camel.apache.org/components/3.20.x/jdbc-component.html#_samples
- First we register our datasource in the Camel registry as testdb:
- Then we configure a route that routes to the JDBC component, so the SQL will be executed. Note how we refer to the testdb datasource that was bound in the previous step:
- Or you can create a DataSource in Spring like this:
- We create an endpoint, add the SQL query to the body of the IN message, and then send the exchange. The result of the query is returned in the OUT body: