0

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.

2
  • 1
    Toggle datasources how? During runtime? Commented Dec 19, 2022 at 19:19
  • I am using Feature toggles so essentially yes. Based on if the toggle is true I want to use a different datasource.My problem is I have configs for both data sources set up. Spring boot wont start the Tomcat server because it doesn't know which one to use Commented Dec 19, 2022 at 19:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.