You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/01/05 12:10:40 UTC
[GitHub] [dubbo] liunancun opened a new issue #9527: 是否支持接口默认方法
liunancun opened a new issue #9527:
URL: https://github.com/apache/dubbo/issues/9527
default <T> void setDeptName(List<T> items, Function<T, Integer> mapper, BiConsumer<T, String> consumer) {
......
}
在接口中定义这样的默认方法,调用的时候报序列化错误
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] juzi214032 commented on issue #9527: 是否支持接口默认方法
Posted by GitBox <gi...@apache.org>.
juzi214032 commented on issue #9527:
URL: https://github.com/apache/dubbo/issues/9527#issuecomment-1005721233
有报错信息吗
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] juzi214032 edited a comment on issue #9527: 是否支持接口默认方法
Posted by GitBox <gi...@apache.org>.
juzi214032 edited a comment on issue #9527:
URL: https://github.com/apache/dubbo/issues/9527#issuecomment-1005721233
有报错信息吗,我这边测试 2.7.15 是支持 default 方法调用的,理论上其他版本也是支持的
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] liunancun commented on issue #9527: 是否支持接口默认方法
Posted by GitBox <gi...@apache.org>.
liunancun commented on issue #9527:
URL: https://github.com/apache/dubbo/issues/9527#issuecomment-1011588543
@juzi214032 那还是没办法把执行结果返回到消费端了
我的需求是想抽取设置部门名字的公共代码,有多个服务涉及到部门,现在是在各自的服务里面都要写一段代码
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] liunancun commented on issue #9527: 是否支持接口默认方法
Posted by GitBox <gi...@apache.org>.
liunancun commented on issue #9527:
URL: https://github.com/apache/dubbo/issues/9527#issuecomment-1005753572
报的是序列化异常,因为Function跟BiConsumer没有实现序列化导致的,但这个接口默认方法应该是在消费端执行的,应该不需要序列化才对
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] juzi214032 commented on issue #9527: 是否支持接口默认方法
Posted by GitBox <gi...@apache.org>.
juzi214032 commented on issue #9527:
URL: https://github.com/apache/dubbo/issues/9527#issuecomment-1006241761
用函数式接口作为参数的话,consumer 调用的时候不要用 lambda 表达式,需要新写一个类,实现对应的函数式接口和Serializable接口,然后传递该类实例
目前 dubbo 默认的 hessian 不支持lambda表达式的反序列化,我会看一下能否实现一下
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] juzi214032 commented on issue #9527: 是否支持接口默认方法
Posted by GitBox <gi...@apache.org>.
juzi214032 commented on issue #9527:
URL: https://github.com/apache/dubbo/issues/9527#issuecomment-1009014453
> 报的是序列化异常,因为Function跟BiConsumer没有实现序列化导致的,但这个接口默认方法应该是在消费端执行的,应该不需要序列化才对
另外补充一下,函数式接口不是在消费端执行的,这段代码会被序列化发送到服务端,在服务端执行
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org