How-To: Spring Boot 2 Web Application with Multiple Mongo Repositories and Kotlin

Maryna Cherniavska
codeburst
Published in
7 min readAug 23, 2019

--

First of all, a disclaimer: if you’re writing a microservice (which everyone does now right?) and want it to be idiomatic, you don’t normally use several different data sources in it.

Image taken from Pixabay © https://pixabay.com/illustrations/software-binary-system-1-0-binary-557616/

Why? Well, by definition, microservices should be loosely coupled, so that they can be independent. Having several microservices writing into…

--

--