You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been playing with this framework and managed to get an initial project working which is a spring application which makes use of plugins through the pf4j framework. The git repo is here: https://github.com/michaelruocco/spring-boot-plugin-example.
The changes are pushed to a branch here: https://github.com/michaelruocco/spring-boot-plugin-example/tree/spring-enabled-plugin. I can see that the problem is that the ChannelIdProvider bean is not being injected into the extension but I am not sure why. I am also confused as to why the .log message from BidvAliasLoaderPlugin are not being printed out on startup. I suspect that I am doing something wrong but I am not sure what. Any help you can provide would be much appreciated.
Thanks.
The text was updated successfully, but these errors were encountered:
@michaelruocco
I will try to help. I wrote in a comment (I didn't find the link) that I am not expert in Spring, so, from this reason I don't add to much comments on this subject (PF4J in Spring).
Maybe other people that use PF4J in Spring applications can help us to improve the interoperability between PF4J and Spring.
@decebals for info I found the solution to this problem. It turns out the project appeared to be working as the plugins were just being picked up from the classpath. However on debugging the plugin loading a bit more closely I found that the plugin classes were not being fired up correctly (which explains my confusion around the .log messages from BidvAliasLoaderPlugin not being printed out on startup.)
In order to get them started correctly I needed to set the -Dpf4j.pluginsDir on the spring boot application when starting it up. I added a jvmArgs argument to my bootRun command like this:
Hi,
I have been playing with this framework and managed to get an initial project working which is a spring application which makes use of plugins through the pf4j framework. The git repo is here: https://github.com/michaelruocco/spring-boot-plugin-example.
What I would now like to do is to make use of spring within the plugins themselves. I have had a go at adding this following this element of the demo: https://github.com/pf4j/pf4j-spring/tree/master/demo/plugins/plugin2/src/main/java/org/pf4j/demo/hello, however I am having some issues.
The changes are pushed to a branch here: https://github.com/michaelruocco/spring-boot-plugin-example/tree/spring-enabled-plugin. I can see that the problem is that the ChannelIdProvider bean is not being injected into the extension but I am not sure why. I am also confused as to why the .log message from BidvAliasLoaderPlugin are not being printed out on startup. I suspect that I am doing something wrong but I am not sure what. Any help you can provide would be much appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: