Uploaded image for project: 'Agroal'
  1. Agroal
  2. AG-234

Add getter for url on AgroalDataSource

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.3
    • None
    • spring
    • None
    • False
    • None
    • False

      When using the agroal with spring-boot in combination with liquibase, one of the options of creating a SpringLiquibase bean is not working. Specifically when using a different username and password but not a different url by setting these in LiquibaseProperties, then the application will crash during initialization. The reason is that when using spring boot's LiquibaseAutoConfiguration it is possible to derive a DataSource from the provided DataSource and use different credentials to run liquibase.

      This is done by getting the url from the provided (unwrapped) DataSource.

      • In spring boot 2.x the provided DataSource is used, being AgroalDataSource (the one in the agroal-spring-boot-starter).
      • From spring boot 3 the DataSource is unwrapped first, meaning that DataSource is being used (the implementation of AgroalDataSource from agroal-api).

              lbarreiro-1 Luis Barreiro
              kimdlanor Ronald Mik (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: