Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

286
Views
MongoDB - Spring Boot : Read from primary and secondary DB together

I am using SpringBoot to connect to MongoDB and perform read/write operations. I have used MongoDB uri for configuring the properties. Now my use case is that I want to read from primary and secondary DB at different places. Is there a way to do this in SpringBoot without having to configure two different MongoClient and MongoTemplate Beans? By easily setting any properties or fields?

I know i can set readPreference in MongoDB uri but that will be a generalization. I want to specifically read from primary and secondary DB using the same SpringBoot-autoConfigured MongoTemplate.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!