Spring Boot WebFlux Reactive MongoDB: how to switch the database on each request?
问题 I'm working on a SaaS project using Spring WebFlux and Reactive MongoDB. It needs to be a MultiTenant application and each tenant must use its own database. As for now I just added the Reactive MongoDB dependency to the pom.xml : <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb-reactive</artifactId> <version>2.2.6.RELEASE</version> </dependency> Then I extended the AbstractReactiveMongoConfiguration in order to provide the MongoClient and