Search code examples
oracle-databasedatasourcequarkus

Quarkus set default database


I have 2 named datasources in my quarkus app, lets call it A and B:

  • quarkus.datasource.A.db-kind=oracle
  • quarkus.datasource.B.db-kind=oracle

Because of this everytime the app started I get this notification :

WARN : Unable to determine a database type for default datasource

Is there a way to set this default? I cant rename or remove the names from the datasources


Solution

  • As mentioned in https://quarkus.io/guides/datasource#multiple-datasources, you should use one of them as the default datasource - i.e. not have it named.

    Something like:

    # this one is the default datasource as it is not named
    quarkus.datasource.db-kind=oracle 
    quarkus.datasource.B.db-kind=oracle