Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

281
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda