I’d like to change the database based in some tenant or anything else, I’ve read the docs and search on google but not found some example using spring boot
1 Like
Doesn’t the config like this make the work?
spring:
datasource:
runtime:
jdbcUrl:
username:
password:
driverClassName:
hikari:
connectionTimeout:
history:
jdbcUrl:
username:
password:
driverClassName:
hikari:
connectionTimeout:
@Bean
@ConfigurationProperties(prefix = "spring.datasource.runtime")
public DataSource dataSource() {
return DataSourceBuilder.create().build();
}