You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, MongoDB by default decodes BSON DateTime to java.util.Date, not java.time.LocalDateTime, which causes all sorts of errors in our application.
To circumvent this, we have the following class in our code base:
However, in the test classes, this does not get called and we still have these issues. We could not find a way how to configure this in Embedded Mongo directly or how to hand over custom MongoClientSettings. Unfortunately, when the ReactiveClientAdapter creates the MongoClient it sets the MongoClientSettings to the defaults which cannot be changed after the construction of the client.
We are using Spring Boot 3.3.3 with de.flapdoodle.embed.mongo version 4.17.0 and de.flapdoodle.embed.mongo.spring3x version 4.16.1 with Java 21.
How can we configure Embedded Mongo to not use the obsolete java.util.Date?
If you need any further information, please let me know.
Thank you for your great work and help!
The text was updated successfully, but these errors were encountered:
Unfortunately, MongoDB by default decodes BSON DateTime to
java.util.Date
, notjava.time.LocalDateTime
, which causes all sorts of errors in our application.To circumvent this, we have the following class in our code base:
However, in the test classes, this does not get called and we still have these issues. We could not find a way how to configure this in Embedded Mongo directly or how to hand over custom
MongoClientSettings
. Unfortunately, when theReactiveClientAdapter
creates theMongoClient
it sets theMongoClientSettings
to the defaults which cannot be changed after the construction of the client.We are using Spring Boot 3.3.3 with
de.flapdoodle.embed.mongo
version 4.17.0 andde.flapdoodle.embed.mongo.spring3x
version 4.16.1 with Java 21.How can we configure Embedded Mongo to not use the obsolete
java.util.Date
?If you need any further information, please let me know.
Thank you for your great work and help!
The text was updated successfully, but these errors were encountered: