-
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
Configure the auto-configured LocalContainerEntityManagerFactoryBean with any ManagedClassNameFilter beans #29193
Comments
In addition, should also provide similar way to configure this in properties/yaml as well. |
Thanks for the suggestion. Entity scanning is heavily package-based at the moment, particularly for JPA where Spring Framework's In the meantime, assuming that you're using JPA, you may be able to achieve a custom property-based solution by providing your own |
@snicoll has prototyped something for this. We should take a look at it and see what we could now do with |
Looking at the change in Framework, it occurs to me that hooking this into For many (all?) of the non-JPA stores, scanning for specific classes is already possible by providing a Taking a small step back, I am not sure that I think the best route forward here may be to provide a JPA-specific filtering interface and for Boot to set such filters on the auto-configured |
Yes! Juergen and I brainstormed and he's suggesting |
ManagedClassNameFilter
beans
ManagedClassNameFilter
beans
Hi,
I would like to request for
@EntityScan
to be able to provide the ability to scan for specific entities class, rather than based on package. E.g@EntityScan(classes={"com.aa.ClassA", "com.aa.ClassB"))
will only scan for these 2 classes and other classes in the same package will NOT be scan.Searching internet shows many people asking for such capabilities and end up having to write some codes to circumvent this.
Adding such capabilities made life easy for developers
The text was updated successfully, but these errors were encountered: