-
Notifications
You must be signed in to change notification settings - Fork 348
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
Multiple datasources support [DATAJDBC-321] #544
Comments
AndreyChukhlebov commented Jens Schauder Hello! I understand that the problem is not very common, but are there any improvements planned?) |
problem solution for postgress https://github.com/AndreyChukhlebov/spring-data-mongo-web crutch) |
@AndreyChukhlebov The solution worked perfectly! Thanks much!!! |
Thanks to @AndreyChukhlebov, I've created an example for multiple RDB (MySQL & PostgreSQL) repositories. We can use |
Hi all! I'm implementing the same solutions from this thread
but experiencing these problems with
How do you solve this? Spring Boot 2.5.2. Both datasources to Oracle. |
Thanks a lot. I've found both of my configurations were extending AbstractJdbcConfiguration. Removed that and marked some of beans |
I also encountered this problem. In which version is this problem solved? |
@kota65535 thanks for the repo |
Hi! Are there plans to implement full support for multiple data sources? This functionality is very lacking. |
I'm trying to implement workaround solutions from @AndreyChukhlebov and @kota65535.
My sample project is here and description to it is here #1289 |
To specify a JdbcConverter for a particular repository, is there any reason I shouldn't override the repositoryFactoryBeanClass by doing the following?
I also use this same method to specify the dialect, as it seems to pick up the wrong dialect even though it is set correctly in the dataAccessStrategy. This works well for me, but I'm just concerned about what the other consequences might be. |
@kota65535
|
Marek Šabo opened DATAJDBC-321 and commented
As mentioned in the SO answer, spring-data-jdbc currently doesn't support multiple datasources.
It would be great to add this support in future releases.
Immediate help for advanced spring users would be making JdbcRepositoryFactoryBean constructor public. That way we could provide our own dependencies based on the context of datasource.
Next step could extending the
@EnableJdbcRepositories
annotation with refs/links to dependencies similar way the @EnableJpaRepositories does.(In our multi-ds JPA project we use similar configuration to one outlined in this article: https://medium.com/@joeclever/using-multiple-datasources-with-spring-boot-and-spring-data-6430b00c02e7)
Affects: 1.1 M1 (Moore), 1.0.4 (Lovelace SR4)
Reference URL: https://stackoverflow.com/a/50197148/303559
Issue Links:
("is duplicated by")
14 votes, 15 watchers
The text was updated successfully, but these errors were encountered: