@Override public void setupModule(SetupContext context) { MongoAnnotationIntrospector annotationIntrospector = new MongoAnnotationIntrospector(context.getTypeFactory()); context.insertAnnotationIntrospector(annotationIntrospector); context.addSerializers(new CustomSerializers()); context.addDeserializers(new CustomDeserializers()); }
@Override public void setupModule(SetupContext context) { MongoAnnotationIntrospector annotationIntrospector = new MongoAnnotationIntrospector(context.getTypeFactory()); context.insertAnnotationIntrospector(annotationIntrospector); // Only include non null properties, this makes it possible to use // object templates for querying and // partial object retrieving context.addDeserializationProblemHandler(new ServerErrorProblemHandler()); context.addSerializers(new TweakedMongoJackSerializers()); context.addDeserializers(new TweakedMongoJackDeserializers()); context.addDeserializers(new MongoJackDeserializers()); context.addAbstractTypeResolver(new CustomAbstractTypeResolver()); }