Skip to content

Commit

Permalink
Fix native support generic service (#15139)
Browse files Browse the repository at this point in the history
* Fix native support generic service

* remove support com.alibaba.dubbo
  • Loading branch information
eye-gu authored Feb 24, 2025
1 parent 1e40653 commit a5604cd
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dubbo-rpc/dubbo-rpc-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generic=org.apache.dubbo.rpc.aot.GenericProxyDescriberRegistrar

0 comments on commit a5604cd

Please sign in to comment.