org.springframework.data.mongodb.core.convert.MongoConverter Java Examples

The following examples show how to use org.springframework.data.mongodb.core.convert.MongoConverter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MongoReactiveDataInitializer.java    From spring-fu with Apache License 2.0 5 votes vote down vote up
@Override
public void initialize(GenericApplicationContext context) {
	MongoReactiveDataAutoConfiguration configuration = new MongoReactiveDataAutoConfiguration();
	context.registerBean(MappingMongoConverter.class, () -> configuration.mappingMongoConverter(context.getBean(MongoMappingContext.class), context.getBean(MongoCustomConversions.class)));
	context.registerBean(SimpleReactiveMongoDatabaseFactory.class, () -> configuration.reactiveMongoDatabaseFactory(this.properties, context.getBean(MongoClient.class)));
	context.registerBean(ReactiveMongoTemplate.class, () -> configuration.reactiveMongoTemplate(context.getBean(ReactiveMongoDatabaseFactory.class), context.getBean(MongoConverter.class)));
}
 
Example #2
Source File: BHBMongoTemplate.java    From HA-DB with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public BHBMongoTemplate(MongoDbFactory mongoDbFactory,MongoConverter mongoConverter ,SequenceOption sequenceOption) {
	super(mongoDbFactory,mongoConverter);
	this.sequenceOption = sequenceOption;
}
 
Example #3
Source File: MongoEntityTemplate.java    From secure-data-service with Apache License 2.0 4 votes vote down vote up
public MongoEntityTemplate(MongoDbFactory mongoDbFactory, MongoConverter mongoConverter) {
    super(mongoDbFactory, mongoConverter);
    this.mapper = new QueryMapper(mongoConverter);
    mappingContext = mongoConverter.getMappingContext();
}