We are using plugin architecture for one of our projects and we decided to use Spring pf4j for the same. When we load the plugin via extensions - the application context is not able to find the beans created using @component in the plugin project- but the beans declared in @configuration classes are injected properly when we configure the plugin using register method - Is there anyway to scan and load the spring components in the plugin?
Asked
Active
Viewed 481 times
1 Answers
0
@Component
in plugin is registered to main ApplicationContext
via SpringExtensionFactory
, make sure you set it up correctly in DefaultPluginManager
correctly.
If you are going to use pf4j in SpringBoot, I would suggest you take a look sbp project. It is built upon pf4j and provides better integration with SpringBoot.

Glorfindel
- 21,988
- 13
- 81
- 109

Hank
- 1,318
- 10
- 29