This is an automated email from the ASF dual-hosted git repository.

crazyhzm pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.3 by this push:
     new a5604cd263 Fix native support generic service (#15139)
a5604cd263 is described below

commit a5604cd2632471b46f66ed0217e84a68dc84a374
Author: eye-gu <[email protected]>
AuthorDate: Mon Feb 24 22:38:34 2025 +0800

    Fix native support generic service (#15139)
    
    * Fix native support generic service
    
    * remove support com.alibaba.dubbo
---
 dubbo-rpc/dubbo-rpc-api/pom.xml                    |  5 +++
 .../rpc/aot/GenericProxyDescriberRegistrar.java    | 40 ++++++++++++++++++++++
 ...rg.apache.dubbo.aot.api.ProxyDescriberRegistrar |  1 +
 3 files changed, 46 insertions(+)

diff --git a/dubbo-rpc/dubbo-rpc-api/pom.xml b/dubbo-rpc/dubbo-rpc-api/pom.xml
index fc50ca0d84..d1dec71be0 100644
--- a/dubbo-rpc/dubbo-rpc-api/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-api/pom.xml
@@ -46,6 +46,11 @@
       <artifactId>dubbo-remoting-api</artifactId>
       <version>${project.parent.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.dubbo</groupId>
+      <artifactId>dubbo-native</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
     <dependency>
       <groupId>org.apache.dubbo</groupId>
       <artifactId>hessian-lite</artifactId>
diff --git 
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/aot/GenericProxyDescriberRegistrar.java
 
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/aot/GenericProxyDescriberRegistrar.java
new file mode 100644
index 0000000000..57128c2d46
--- /dev/null
+++ 
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/aot/GenericProxyDescriberRegistrar.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.rpc.aot;
+
+import org.apache.dubbo.aot.api.JdkProxyDescriber;
+import org.apache.dubbo.aot.api.ProxyDescriberRegistrar;
+import org.apache.dubbo.rpc.service.Destroyable;
+import org.apache.dubbo.rpc.service.EchoService;
+import org.apache.dubbo.rpc.service.GenericService;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GenericProxyDescriberRegistrar implements ProxyDescriberRegistrar 
{
+
+    @Override
+    public List<JdkProxyDescriber> getJdkProxyDescribers() {
+        List<JdkProxyDescriber> describers = new ArrayList<>();
+        List<String> proxiedInterfaces = new ArrayList<>();
+        proxiedInterfaces.add(GenericService.class.getName());
+        proxiedInterfaces.add(EchoService.class.getName());
+        proxiedInterfaces.add(Destroyable.class.getName());
+        describers.add(new JdkProxyDescriber(proxiedInterfaces, null));
+        return describers;
+    }
+}
diff --git 
a/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.aot.api.ProxyDescriberRegistrar
 
b/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.aot.api.ProxyDescriberRegistrar
new file mode 100644
index 0000000000..15a78e748f
--- /dev/null
+++ 
b/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.aot.api.ProxyDescriberRegistrar
@@ -0,0 +1 @@
+generic=org.apache.dubbo.rpc.aot.GenericProxyDescriberRegistrar

Reply via email to