-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Change HibernateJpaConfiguration to public to be able to extend it #10663
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
Change HibernateJpaConfiguration to public to be able to extend it #10663
Conversation
|
@damienbeaufils Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@damienbeaufils Thank you for signing the Contributor License Agreement! |
|
@damienbeaufils extending from an auto-configuration isn't really a great idea. Can we take a step back and discuss why you need to do this? Perhaps we can adapt the auto-configuration to take that use case into account. |
|
@snicoll I agree extending from an autoconfiguration is not great. |
|
Can you show an example of such override please? |
|
Sure. An example: If you need a whole project using this code, see this repository. |
|
This feels like the sort of thing that we've previously solved with a customizer interface. If we consider this to be too much of an edge case to warrant that, a bean post-processor could be used instead. |
|
@wilkinsona Do you have an example of a customizer interface somewhere? |
|
|
|
perhaps |
|
I like that idea, @snicoll. The method just takes |
|
Cool. @damienbeaufils I am not keen to change the scope of that class (extending the |
Hello,
Since this commit, we can't extend anymore
HibernateJpaAutoConfigurationclass to specify hibernate mapping files like this, but we can’t either extendHibernateJpaConfigurationclass because it is package-protected.This PR changes
HibernateJpaConfigurationclass modifier topublicto be able to extend it.It could be a solution for this question on SO.
Thanks!