|
@@ -39,6 +39,8 @@ import javax.annotation.PostConstruct;
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.boot.context.event.ApplicationReadyEvent;
|
|
|
+import org.springframework.context.event.EventListener;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
@Component
|
|
@@ -62,8 +64,8 @@ public class TaskPluginManager {
|
|
|
return Collections.unmodifiableMap(taskChannelMap);
|
|
|
}
|
|
|
|
|
|
- @PostConstruct
|
|
|
- public void installPlugin() {
|
|
|
+ @EventListener
|
|
|
+ public void installPlugin(ApplicationReadyEvent readyEvent) {
|
|
|
final Set<String> names = new HashSet<>();
|
|
|
|
|
|
ServiceLoader.load(TaskChannelFactory.class).forEach(factory -> {
|