FAQ Database Discussion Community

Usage of ClassTypeInformation.from(..) inside MappingMongoConverter introduces much thread contention

I am writing an application which is storing a lot of objects into MongoDB via Spring Data's MongoTemplate. In order to avoid synchronization, I am creating a separate MongoTemplate for each thread. In fact, each thread get's it's own just about everything to avoid synchronization. The application processes events generated...

Spring Mongo convert to document from json string

I have a Mongo collection annotated with @Document and I want the possibility to also get that Java object from a String (JSON) as we're getting these classes pushed into a queue as String. Is there a method in Spring-Data-Mongo which converts from JSON to the actual Document object?...