GtdDev
GtdDev

Reputation: 928

Change spring data r2dbc context to use R2dbcRepositories in a different database

How can I change spring data r2dbc repositories target-datatabase (maybe I am talking about 'Context')?

Let me explain better.

I am managing(ConnectionFactory Properties) 'connection factory' to execute SQL-DDL scripts in any database I want - OK; however, R2dbcRepositories (REactiveCruRepository) methods, are not follow this database I have configured ConnectionFactory Properties.

How Can I change ConnectionFactory Properties, in order to, REactiveCruRepository points for this configuration done (meaning a new database)?

Upvotes: 0

Views: 1431

Answers (1)

Hantsy
Hantsy

Reputation: 9241

It is very easy to configure another connection factory for your R2dbc Repositories.

Check my example about multiple R2dbc connection factories.

Upvotes: 1

Related Questions