S

Shyam Dubey • 3.70K Points
Extraordinary

Q. How can you configure multiple datasources in Spring Boot?

  • (A) By adding multiple datasource files
  • (B) Using XML configuration only
  • (C) Using @Primary and custom @Configuration classes
  • (D) Not supported in Spring Boot
  • Correct Answer - Option(C)
  • Views: 9
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
Multiple datasources are configured using custom @Configuration classes and marking one as @Primary.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.