Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for Spring Data JDBCs Crud Repository with multiple datasources #544

Open
kle-dev opened this issue Nov 27, 2019 · 0 comments
Open
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@kle-dev
Copy link

kle-dev commented Nov 27, 2019

Hello together,

we may all knows that we can set up to a JDBCTemplate a Datasource, so a JDBCTemplate knows which datasource it has: JDBCTemplate JdbcTemplate = new JDBCTemplate(dataSource)

Whats about with a CrudRepository ? How can a CrudRepository knows to which database it should communicate to ? It is using the default one, all time. If we setup a second database in Configuration, a CrudRepositry will use the first and primary one.

Is there an example of using CrudRepository with two databases ? I can't find one in web.

I post it also in stack overflow here

Thank you.

@kle-dev kle-dev changed the title Spring Data JDBCs Crud Repository with multiple datasources Example for Spring Data JDBCs Crud Repository with multiple datasources Nov 27, 2019
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants