spring-data-mongodb
spring-data-mongodb copied to clipboard
Add support for MongoDB Kotlin sync/coroutine Driver.
Provide an extension for SimpleMongoClientDatabaseFactory & SimpleReactiveMongoDatabaseFactory that accepts a com.mongodb.kotlin.client.MongoClient respectively com.mongodb.kotlin.client.coroutine.MongoClient
Since the Kotlin driver is wrapping the Java driver we can unwrap the instance and pass it on to the factory.
Though unfortunate that there's no public API to access the wrapped instance the provided tests will alert on driver changes.
Closes: #4393
@rozza would it be possible to have some public API in the Kotlin driver to access the underlying Java driver? Currently we need to use reflection to get hold on the wrapped client.