org.springframework.data.r2dbc.function.DatabaseClient Java Examples

The following examples show how to use org.springframework.data.r2dbc.function.DatabaseClient. 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: FriendService.java    From event-sourcing-microservices-example with GNU General Public License v3.0 5 votes vote down vote up
public FriendService(TransactionalDatabaseClient transactionalDatabaseClient, DatabaseClient databaseClient,
                     MappingR2dbcConverter converter, UserClient userClient) {
    this.transactionalDatabaseClient = transactionalDatabaseClient;
    this.databaseClient = databaseClient;
    this.converter = converter;
    this.userClient = userClient;
}
 
Example #2
Source File: InfrastructureConfiguration.java    From Hands-On-Reactive-Programming-in-Spring-5 with MIT License 4 votes vote down vote up
@Bean
R2dbcRepositoryFactory repositoryFactory(DatabaseClient client) {
   RelationalMappingContext context = new RelationalMappingContext();
   return new R2dbcRepositoryFactory(client, context);
}
 
Example #3
Source File: ReactiveDbApplication.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Bean
public DatabaseClient databaseClient(ConnectionFactory factory) {
    return DatabaseClient.create(factory);
}
 
Example #4
Source File: ReactiveDbApplication.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Bean
public R2dbcRepositoryFactory factory(DatabaseClient client) {
	RelationalMappingContext context = new RelationalMappingContext();
    context.afterPropertiesSet();
    return new R2dbcRepositoryFactory(client, context);
}
 
Example #5
Source File: ReservationServiceApplication.java    From bootiful-reactive-microservices with Apache License 2.0 4 votes vote down vote up
DbClientListener(DatabaseClient databaseClient) {
	this.databaseClient = databaseClient;
}
 
Example #6
Source File: UserService.java    From event-sourcing-microservices-example with GNU General Public License v3.0 4 votes vote down vote up
public UserService(TransactionalDatabaseClient transactionalDatabaseClient, DatabaseClient databaseClient,
                   MappingR2dbcConverter converter) {
	this.transactionalDatabaseClient = transactionalDatabaseClient;
	this.databaseClient = databaseClient;
	this.converter = converter;
}