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/03/07 13:12:58 UTC
[GitHub] [dubbo-go] shenchao861129 opened a new issue #1780: 使用GO重构JAVA服务,遇到方法重载时的实现方案。
shenchao861129 opened a new issue #1780:
URL: https://github.com/apache/dubbo-go/issues/1780
// java
public class CommentServiceImpl implements CommentService {
public boolean isForbidsSpeak(Long bookId, Long userId);
public boolean isForbidsSpeak(Long bookId, Long userId, String ip);
......
}
// go
type CommentServiceProvider struct{}
func (p *CommentServiceProvider) IsForbidsSpeak(ctx context.Context, params []interface{}) (interface{}, error) {
l := len(params)
if l == 2 {
// TODO
} else if l == 3 {
// TODO
} else {
// TODO
}
return nil, nil
}
func (p *CommentServiceProvider) MethodMapper() map[string]string {
return map[string]string{
"IsForbidsSpeak": "isForbidsSpeak",
}
}
--
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-go] ChangedenCZD commented on issue #1780: how to implement the Java Override method in dubbogo
Posted by GitBox <gi...@apache.org>.
ChangedenCZD commented on issue #1780:
URL: https://github.com/apache/dubbo-go/issues/1780#issuecomment-1061286577
建议写个小工具做预处理和分发,减少代码复杂度
--
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-go] AlexStocks commented on issue #1780: how to implement the Java Override method in dubbogo
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #1780:
URL: https://github.com/apache/dubbo-go/issues/1780#issuecomment-1060740859
更严谨点,就是判断下参数类型序列,但一般情况下没必要,毕竟 Go 的反射太费 cpu。
--
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-go] AlexStocks commented on issue #1780: how to implement the Java Overload method in dubbogo
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #1780:
URL: https://github.com/apache/dubbo-go/issues/1780#issuecomment-1081702972
> It should be Overload, not Override.
have changed the title. thx.
--
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-go] cjphaha commented on issue #1780: how to implement the Java Override method in dubbogo
Posted by GitBox <gi...@apache.org>.
cjphaha commented on issue #1780:
URL: https://github.com/apache/dubbo-go/issues/1780#issuecomment-1060762184
nice!
--
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-go] search-cloud commented on issue #1780: how to implement the Java Override method in dubbogo
Posted by GitBox <gi...@apache.org>.
search-cloud commented on issue #1780:
URL: https://github.com/apache/dubbo-go/issues/1780#issuecomment-1081662660
It should be Overload, not Override.
--
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