In this tutorial, we will discuss how to connect two different MongoDB databases from your Spring boot application. This article assumes you already have MongoDB integrated into your project, hence this post skips the basics.
To connect to multiple MongoDB databases, we need to use MongoClientFactoryBean to create multiple MongoClient instances that connects to two different databases.
Read the complete step-by-step guide on stacktips.com