This is an automated email from the ASF dual-hosted git repository.
caishunfeng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 0176f4bf61 [Bug-9737][Api] fix task plugin load in api (#9744)
0176f4bf61 is described below
commit 0176f4bf61132d48eff13793bea92ffbb0e174ba
Author: caishunfeng <[email protected]>
AuthorDate: Mon Apr 25 13:26:34 2022 +0800
[Bug-9737][Api] fix task plugin load in api (#9744)
* fix task plugin load in api
* task plugin loading by event
---
.../apache/dolphinscheduler/api/ApiApplicationServer.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/ApiApplicationServer.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/ApiApplicationServer.java
index 7981f8a48d..9e6aa94530 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/ApiApplicationServer.java
+++
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/ApiApplicationServer.java
@@ -17,18 +17,31 @@
package org.apache.dolphinscheduler.api;
+import org.apache.dolphinscheduler.service.task.TaskPluginManager;
+
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.event.EventListener;
@ServletComponentScan
@SpringBootApplication
@ComponentScan("org.apache.dolphinscheduler")
public class ApiApplicationServer {
+ @Autowired
+ private TaskPluginManager taskPluginManager;
+
public static void main(String[] args) {
SpringApplication.run(ApiApplicationServer.class);
}
+ @EventListener
+ public void run(ApplicationReadyEvent readyEvent) {
+ // install task plugin
+ taskPluginManager.installPlugin();
+ }
}