chickenlj commented on pull request #6520:
URL: https://github.com/apache/dubbo/pull/6520#issuecomment-1068795197
```java
protected <T> T doRefer(final Class<T> serviceType, URL url) throws
RpcException {
String generic = url.getParameter("generic");
boolean isGeneric = ProtocolUtils.isGeneric(generic) ||
serviceType.equals(GenericService.class);
JsonProxyFactoryBean jsonProxyFactoryBean = new
JsonProxyFactoryBean();
JsonRpcProxyFactoryBean jsonRpcProxyFactoryBean = new
JsonRpcProxyFactoryBean(jsonProxyFactoryBean);
jsonRpcProxyFactoryBean.setRemoteInvocationFactory((methodInvocation) -> {
RemoteInvocation invocation = new
JsonRemoteInvocation(methodInvocation);
if (isGeneric) {
invocation.addAttribute("generic", generic);
}
return invocation;
});
String key = url.setProtocol("http").toIdentityString();
if (isGeneric) {
key = key + "/" + "generic";
}
jsonRpcProxyFactoryBean.setServiceUrl(key);
jsonRpcProxyFactoryBean.setServiceInterface(serviceType);
jsonProxyFactoryBean.afterPropertiesSet();
return jsonProxyFactoryBean.getObject();
}
```
It's mainly because this original proxy doesn't support methods of
`CompletableFuture ` signature.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]