We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@Configuration public class SpringConfiguration { @Bean public MessageProvider messageProvider() { return new HelloMessageProvider(); } @Bean public SpringPluginManager pluginManager() { return new SpringPluginManager(); } @Bean @DependsOn("pluginManager") public Greetings greetings() { return new Greetings(); } }
public static void main(String[] args) { // print logo printLogo(); // retrieves the spring application context ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringConfiguration.class); MessageProvider messageProvider = applicationContext.getBean(MessageProvider.class); // retrieves automatically the extensions for the Greeting.class extension point Greetings greetings = applicationContext.getBean(Greetings.class); greetings.printGreetings(); // stop plugins PluginManager pluginManager = applicationContext.getBean(PluginManager.class); /* // retrieves manually the extensions for the Greeting.class extension point List<Greeting> greetings = pluginManager.getExtensions(Greeting.class); System.out.println("greetings.size() = " + greetings.size()); */ pluginManager.stopPlugins(); }
However the MessageProvider is null 。 Help plz
The text was updated successfully, but these errors were encountered:
Can you run demo script from command line (run-demo.sh for linux or run-demo.bat for windows) and share the result?
run-demo.sh
run-demo.bat
Sorry, something went wrong.
Any news?
No branches or pull requests
This is the SpringConfiguration
This is the main method
However the MessageProvider is null 。 Help plz
The text was updated successfully, but these errors were encountered: