-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Add JPA components only on single DataSource #6560
Add JPA components only on single DataSource #6560
Conversation
Update auto-configuration logic so that JPA components are only added when there is a single candidate DataSource bean. Related with spring-projectsgh-6449
d29c458
to
3188f4f
Compare
} | ||
@Configuration | ||
@ConditionalOnSingleCandidate(DataSource.class) | ||
static class HibernateJpaConfiguration extends JpaBaseConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a bold move but I think I like it. I have a feeling it's going to break user's app, wdyt @wilkinsona ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might too. I don't think such a change belongs in 1.4.1.
Coming in via #9394 so apologies if I've missed something, but should |
@zachmarshall if there is a I really don't think that's a good way to fix your issue though. Let's keep the conversation on #9394 please. |
@snicoll what if you wanted |
There is somewhat related issue for datasource initialization #9528 |
Duplicate of #5541 Thanks @kazuki43zoo for the PR, I ended up taking a slightly different route. |
Update auto-configuration logic so that JPA components
are only added when there is a single candidate DataSource bean.
Related with gh-6449
Please review.