camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Ferraro (JIRA)" <>
Subject [jira] [Resolved] (CAMEL-10618) camel-sql - Allow to use Spring Boot DataSource
Date Mon, 13 Feb 2017 16:46:42 GMT


Nicola Ferraro resolved CAMEL-10618.
    Resolution: Done

Using a fallback strategy if the registry contains only 1 datasource (implemented at component

I could have put 'spring-boot-starter-jdbc' into the transitive dependencies of our starter,
but doing so, spring-boot forces you to bind a datasource to the registry. I left it optional
(test dependency in the starter).

> camel-sql - Allow to use Spring Boot DataSource
> -----------------------------------------------
>                 Key: CAMEL-10618
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring-boot, camel-sql
>            Reporter: Claus Ibsen
>            Assignee: Nicola Ferraro
>             Fix For: 2.19.0
> I wonder if we can add some logic that can auto detect if we run in spring boot and if
you have configured a spring boot data source using the spring boot style
> {code}
> spring.datasource.url: jdbc:mysql://localhost:3306/o365investigations
> spring.datasource.username: <snip>
> spring.datasource.password: <snip>
> spring.datasource.driver-class-name: com.mysql.jdbc.Driver
> {code}
> And then fallback and use that data source if none has been explicit configured on the
> And wonder if we can do this in a way that don't require special coding?
> We could maybe add to camel-sql, that it attempts to lookup in registry of all types
of DataSource and if there is only one instance, it uses that.

This message was sent by Atlassian JIRA

View raw message