-
-
Save greenlaw110/4266a3692125b2ab56fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MongoTemplate mongo = ...; | |
List<Converter> converters = new ArrayList<Converter>(); | |
converters.add(new Converter<DBObject, Participant>() { | |
public Participant convert(DBObject s) { | |
throw new UnsupportedOperationException("Not supported yet 1."); | |
} | |
}); | |
converters.add(new Converter<Participant, DBObject>() { | |
public DBObject convert(Participant s) { | |
throw new UnsupportedOperationException("Not supported yet 2."); | |
} | |
}); | |
CustomConversions cc = new CustomConversions(converters); | |
MappingMongoConverter mmc = (MappingMongoConverter)mongo.getConverter(); | |
mmc.setCustomConversions(cc); | |
mmc.afterPropertiesSet() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment