From f9fa86312f57bfa33a5b586cabb024801d30d1c9 Mon Sep 17 00:00:00 2001 From: Roberto Franchini Date: Mon, 28 Jan 2019 18:56:28 +0100 Subject: [PATCH] =?utf8?q?configures=20plugin=20manager=20to=20load=20"How?= =?utf8?q?dyGreeting"=20using=20the=20services=20=E2=80=A6=20(#277)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- demo/app/src/main/java/org/pf4j/demo/Boot.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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(); -- 2.39.5