zhongjiajie commented on a change in pull request #6269:
URL: https://github.com/apache/dolphinscheduler/pull/6269#discussion_r714713021



##########
File path: dolphinscheduler-python/src/main/java/server/PythonGatewayServer.java
##########
@@ -36,16 +37,40 @@
 import 
org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.FilterType;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
 import py4j.GatewayServer;
 
+import javax.annotation.PostConstruct;
 import java.util.Map;
 
-@SpringBootApplication
+@ComponentScan(value = "org.apache.dolphinscheduler", excludeFilters = {
+        @ComponentScan.Filter(type = FilterType.REGEX, pattern = {
+                "org.apache.dolphinscheduler.server.master.*",
+                "org.apache.dolphinscheduler.server.monitor.*",
+                "org.apache.dolphinscheduler.server.log.*"
+        })
+})
+@EnableTransactionManagement
 public class PythonGatewayServer {
     // TODO could this work in py4j
     @Autowired
     private ProcessDefinitionMapper processDefinitionMapper;
 
+    @Autowired
+    private ProjectService projectService;
+
+    @Autowired
+    private TenantService tenantService;
+
+    @Autowired
+    private ExecutorService executorService;
+
+    @Autowired
+    private ProcessDefinitionService processDefinitionService;
+
+    @Autowired
+    private TaskDefinitionService taskDefinitionService;
+

Review comment:
       It's odd that ALL server and mapper are `null` when I call from python 
client, and I could not get the right result from this server
   
![image](https://user-images.githubusercontent.com/15820530/134500794-5f801585-ecdd-4788-8e7f-c9db8ae8adb0.png)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to