Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10618

camel-sql - Allow to use Spring Boot DataSource

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.19.0
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      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

      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
      

      And then fallback and use that data source if none has been explicit configured on the component.

      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.

        Attachments

          Activity

            People

            • Assignee:
              nferraro Nicola Ferraro
              Reporter:
              davsclaus Claus Ibsen

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment