-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Support comma-separated values when resolving placeholders in @EntityScan's basePackages or value attributes #25415
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
Comments
To avoid duplication of effort, I'm going to close this issue in favour of the question on Stack Overflow. Edit: I see now that the Stack Overflow question is a couple of years old. If the answers to the question and the above do not help you, please ask a question of your own that explains why you want to externalize the packages to scan. That will make it easier for people to suggest an appropriate alternative. |
I was mistaken above. As shown by #25436, |
It would be great if the same solution could be applied also to other annotations related to package scanning such as |
@reckart As Andy mentioned, could you elaborate on why you want to change the packages based on configuration? |
I am maintaining an application where we normally restrict the package scanning to packages that we ship. However, as part of allowing users to supply plugins, I thought it would be useful if the users could re-configure the package scanning to allow the packages from their plugins to be scanned as well. Mind, a better plugin mechanism might also resolve that - but for a poor-mans plugin approach where people can simply throw in a few new JARs without having to recompile the entire thing, it would come in quite handy if they could extend the package scanning scope without having to recompile the main application. |
Thanks for the context. It looks like I think in that case it would make sense to reinstate the behavior in #25436 so that it aligns with component scanning and also handle multiple values. |
Update EntityScanPAckages to support comma-separated values when resolving placeholders in EntityScan's basePackages or value attributes. Fixes spring-projectsgh-25415
Closing in favor of PR #27355. |
It does not seem to be possible in inject a multi-valued property into the
@EntityScan
annotation.Examples that do not work:
Related unresolved question on Stack Overflow: https://stackoverflow.com/questions/55374224/reading-multiple-entity-scan-packages-in-spring-boot-application
The text was updated successfully, but these errors were encountered: