runtime sounds confusing. You can override BEFORE starting app. Imagine the case, you have url_XXX
and url_YYY
.
You can start app with
-Dquarkus.datasource.jdbc.url=url_XXX
and get datasource with connection to url_XXX. There is no option to get connection to url_YYY
in runtime. You'll have to restart app with
-Dquarkus.datasource.jdbc.url=url_YYY
in order to connect to different DB.
Another option would be to use named datasources, but still you have define them at build time and provide url BEFORE starting app.
-Dquarkus.datasource.YYY.jdbc.url=url_YYY -Dquarkus.datasource.XXX.jdbc.url=url_XXX
Quarkus names it "runtime", but actually it's "pre-runtime"