tobes
tobes

Reputation: 124

Java Spring Boot application to toggle between data sources (Configuration Classes)

I have a Java Spring Boot application currently connected to an on premises database. I am trying to figure out how to toggle between the existing datasource and a new one I have added. I have both data sources added in the application yml and defined in 2 (Config classes). I want to add logic to determine which one to use, a simple if-statement.

Upvotes: 0

Views: 212

Answers (0)

Related Questions