org.springframework.data.mongodb.ReactiveMongoDatabaseFactory Java Examples

The following examples show how to use org.springframework.data.mongodb.ReactiveMongoDatabaseFactory. 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: DemoApplication.java    From spring-reactive-sample with GNU General Public License v3.0 4 votes vote down vote up
@Bean
public ReactiveGridFsTemplate reactiveGridFsTemplate(ReactiveMongoDatabaseFactory reactiveMongoDbFactory, MappingMongoConverter mappingMongoConverter) {
    return new ReactiveGridFsTemplate(reactiveMongoDbFactory, mappingMongoConverter);
}
 
Example #3
Source File: ReactiveManagedTransitionServiceTests.java    From spring-data-examples with Apache License 2.0 4 votes vote down vote up
@Bean
ReactiveTransactionManager transactionManager(ReactiveMongoDatabaseFactory dbFactory) {
	return new ReactiveMongoTransactionManager(dbFactory);
}