bob
bob

Reputation: 250

One line to define a specific property for all named datasources in Quarkus application.properties

I'm wondering if there is a way to define a property for multiple named datasources in one line?

For example, instead of doing this

quarkus.datasource."name1".db-kind=postgresql
quarkus.datasource."name2".db-kind=postgresql
quarkus.datasource."name3".db-kind=postgresql

I want to do something like this in one line for "name1", "name2", "name3"

quarkus.datasource.db-kind=postgresql

But this won't work however since quarkus.datasource.db-kind=postgresql will be assigned to the default datasource and not "name1", "name2", "name3", etc...

Upvotes: 0

Views: 67

Answers (1)

geoand
geoand

Reputation: 64009

You can't do this, you need to specify the names of each datasource explicitly.

The reason is that each name maps to multiple properties, not the other way around

Upvotes: 1

Related Questions