-
Notifications
You must be signed in to change notification settings - Fork 41k
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
Spring boot jdbc data repository by multi data source #26579
Comments
I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference. |
It's hard to tell from the description if this is a bug in Spring Boot, Spring Data JDBC or a configuration issue. You could try debugging your application to check that |
This has also been posted as a question on Stack Overflow where a couple of other people are also trying to help. @davoodshiraz please don’t cross-post like this as it ends up in people duplicating effort and wasting their time. In the interests of avoid any more of that, I’m going to close this in favour of the post on Stack Overflow. Updating it with a minimal, reproducible example would make it easier for people to help. We can re-open this issue if it turns out that it is a Spring Boot bug. |
I have this problem with SB 2.7.2 I have created a very simple sample project to reproduce the problem @philwebb |
@oburgosm Both of your repositories are sharing the same You can configure a reference to a custom If you do open an issue, please comment here with a link to it so that people can follow along. |
Thanks for your response @wilkinsona . I just found that there is an issue to support multiple datasources in spring-data-jdbc, but it is still open. I'll follow that issue. |
please help me.
I use multi data source in my project
data source properties:
config class:
repository in com.example.demo.mssqlModels:
repository in com.example.demo.mysqlModels:
my service:
but result is same and both repositories read data from mysql datasource
thanks
The text was updated successfully, but these errors were encountered: