aboutsummaryrefslogtreecommitdiffstats
path: root/demo/app/src
diff options
context:
space:
mode:
authorRoberto Franchini <ro.franchini@gmail.com>2019-01-28 18:56:28 +0100
committerDecebal Suiu <decebal.suiu@gmail.com>2019-01-28 19:56:28 +0200
commitf9fa86312f57bfa33a5b586cabb024801d30d1c9 (patch)
tree3d744994d533059b2a2ade82049eab4730e93d6f /demo/app/src
parentb03d327a8ca7c95ced5b1a821578619fb6ae2bc3 (diff)
downloadpf4j-f9fa86312f57bfa33a5b586cabb024801d30d1c9.tar.gz
pf4j-f9fa86312f57bfa33a5b586cabb024801d30d1c9.zip
configures plugin manager to load "HowdyGreeting" using the services … (#277)
Diffstat (limited to 'demo/app/src')
-rw-r--r--demo/app/src/main/java/org/pf4j/demo/Boot.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/demo/app/src/main/java/org/pf4j/demo/Boot.java b/demo/app/src/main/java/org/pf4j/demo/Boot.java
index d3cb620..95d8898 100644
--- a/demo/app/src/main/java/org/pf4j/demo/Boot.java
+++ b/demo/app/src/main/java/org/pf4j/demo/Boot.java
@@ -16,7 +16,9 @@
package org.pf4j.demo;
import org.apache.commons.lang.StringUtils;
+import org.pf4j.DefaultExtensionFinder;
import org.pf4j.DefaultPluginManager;
+import org.pf4j.ExtensionFinder;
import org.pf4j.PluginManager;
import org.pf4j.PluginWrapper;
import org.pf4j.demo.api.Greeting;
@@ -36,7 +38,17 @@ public class Boot {
printLogo();
// create the plugin manager
- final PluginManager pluginManager = new DefaultPluginManager();
+ final PluginManager pluginManager = new DefaultPluginManager() {
+
+ protected ExtensionFinder createExtensionFinder() {
+ DefaultExtensionFinder extensionFinder = (DefaultExtensionFinder) super.createExtensionFinder();
+ extensionFinder.addServiceProviderExtensionFinder();
+
+ return extensionFinder;
+ }
+
+ };
+
// load the plugins
pluginManager.loadPlugins();