Hi,
Could you take a look at this questions?
Question: How to update the ‘List’ bean while some plugins are unloaded/deleted?
public class Greetings {
@Autowired
private List<Greeting> greetings;
public void printGreetings() {
System.out.println(String
.format("Found %d extensions for extension point '%s'", greetings.size(),
Greeting.class.getName()));
for (Greeting greeting : greetings) {
System.out.println(">>> " + greeting.greeting());
}
}
}
- At the begining, there're 3 extensions found
Found 3 extensions for extension point 'api.Greeting'
>>> custom
>>> Plugin2Greeting
>>> Plugin1Greeting
- And I'd like to unload plugin-1 and try to replace it with a new plugin latter
@GetMapping("uninstall/{pluginId}")
public Flux<String> uninstall(@PathVariable String pluginId) {
pluginManager.stopPlugin(pluginId);
pluginManager.unloadPlugin(pluginId);
return Flux.just("ok");
}
- unfortunately, there're still be 3 extensions printed after the plugin-1 is unloaded.....
So how to update the bean 'List' during runtime, or any samples illustrate how to integrate with pf4j-update?
Thanks.
Hi,
Could you take a look at this questions?
Question: How to update the ‘List’ bean while some plugins are unloaded/deleted?
So how to update the bean 'List' during runtime, or any samples illustrate how to integrate with pf4j-update?
Thanks.