I want to scan all the classes in a package that that are subclasses of the particular class. Then I want to take these classes and for each of them instantiate a bean of same type, using the class as a property. Then I want to gather all these anonymous beans and put them into collection. Is it possible to configure spring context in XML like this? Thx
Just use this class:
ClassPathScanningCandidateComponentProvider
method: findCandidateComponents.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With