Using the Mongobee for Migration with spring mongo
plugins {
id \'org.springframework.boot\' version \'2.3.1.RELEASE\'
id \'io.spring.dependency-manageme
You are running across an incompatibility between the MongoDB Java driver required by the newer versions of Spring Data MongoDB, and the one used by mongobee. Spring Data MongoDB requires version 4 of the Mongo Java libraries, whereas mongobee requires version 3. The two versions are incompatible with each other, and cannot be used concurrently within an application.
By all indications, mongobee has been abandoned by its creators, with the last commit being made in March, 2018, and no responses to issues by the creators since then. Therefore, don't expect an updated version of that library to be released with support for the new version of the Mongo Java drivers.
Due to this project abandonment, several successor libraries were forked from mongobee. From what I have been able to determine, Mongock is the only remaining actively maintained successor library. It has support for both version 3 and version 4 of the Mongo Java libraries.
Mongock is a significant evolution of Mongobee, with built-in support for migrating from mongobee. In addition to its built-in support for version 4 of the Mongo Java driver, it has optional built-in integration with Spring & Spring Boot.
Therefore, if you wish to use a recent version of Spring Data MongoDB with a mongobee-compatible migration library, Mongock is going to the be easiest, most straightforward approach.
dependencies {
[...]
compile 'com.github.cloudyrock.mongock:mongock-api:4.1.14'
}