Spring not using mongo custom converters
问题 I have been trying to register my own write custom converters to change the default ID value. But it never actually calls. Here is my Custom Converter public class EventKeyConverter implements Converter<Event,DBObject> { @Override public DBObject convert(Event object) { DBObject dbObject = DBObjectTransformer.toDBObject(object); dbObject.put("_id", KeyGenerator.getRandomKey()); return dbObject; } } here is the place that I did register customer converter @Override @Bean public