Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Brief

Dubbo should be added new annotations for MethodConfig and ArgumentConfig in order to complete Annotation-Driven Programming Model.

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.2

Operating System version: 本地macos，docker容器基础镜像alpine

Java version: 1.8

SpringBoot: 2.1.5.RELEASE

Steps to reproduce this issue

Spring filter中注入

@Reference(version = "*")
private TyrfingUserService userService;

然后调用服务接口

userService.getUserByLoginName(loginName)

服务实现了GenericService接口

这里需要对每个实现类的方法参数进行相应的验证

@Override
public Object $invoke(String methodName, String[] parameterTypes, Object[] args) throws GenericException {
MethodInvocation methodInvocation = MethodInvocationUtils.createFromClass(this.getClass(), methodName);
if (methodInvocation == null) {
throw new GenericException(new NoSuchMethodException(methodName));
}
Method method = methodInvocation.getMethod();

// 这里需要对每个实现类的方法参数进行相应的验证
// ...
try {
return method.invoke(this, invokeArgs);
} catch (IllegalAccessException e) {
throw new GenericException(e);
} catch (InvocationTargetException e) {
throw new GenericException(e.getTargetException());
}
}

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

docker环境下服务消费端抛出异常，本地开发环境中测试可以：

是不是$invoke中的method.invoke这样的调用方式是不允许的？

如果不允许的话，我应该怎样实现？

org.apache.dubbo.rpc.RpcException: Failed to invoke the method getUserByLoginName in the service com.tyrfing.service.auth.TyrfingUserService. Tried 3 times of the providers [172.18.0.6:10050] (1/1) from the registry registry:2181 on the consumer 172.18.0.6 using the dubbo version 2.7.2. Last error is: org.apache.dubbo.rpc.RpcException: Failed to invoke remote method: getUserByLoginName, provider: dubbo://172.18.0.6:10050/com.tyrfing.service.auth.TyrfingUserService?anyhost=true&application=demo&bean.name=ServiceBean:com.tyrfing.service.auth.TyrfingUserService&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=com.tyrfing.service.auth.TyrfingUserService&lazy=false&methods=*&pid=1&qos-enable=false&reference.filter=tyrfing_tracing&register=true&register.ip=172.18.0.6&release=2.7.2&remote.application=demo&revision=1.0.1&service.filter=tyrfing_tracing&side=consumer&sticky=false&timestamp=1560839021419&version=1.0.0, cause: org.apache.dubbo.remoting.RemotingException: org.apache.dubbo.rpc.RpcException: org.apache.dubbo.rpc.RpcException: Failed to invoke remote proxy method getUserByLoginName to registry://registry:2181/org.apache.dubbo.registry.RegistryService?application=demo&client=curator&dubbo=2.0.2&export=dubbo%3A%2F%2F172.18.0.6%3A10050%2Fcom.tyrfing.service.auth.TyrfingUserService%3Fanyhost%3Dtrue%26application%3Ddemo%26bean.name%3DServiceBean%3Acom.tyrfing.service.auth.TyrfingUserService%26bind.ip%3D172.18.0.6%26bind.port%3D10050%26deprecated%3Dfalse%26dubbo%3D2.0.2%26dynamic%3Dtrue%26generic%3Dtrue%26interface%3Dcom.tyrfing.service.auth.TyrfingUserService%26methods%3D*%26pid%3D1%26qos-enable%3Dfalse%26register%3Dtrue%26release%3D2.7.2%26service.filter%3Dtyrfing_tracing%26side%3Dprovider%26timestamp%3D1560839021419%26version%3D1.0.0&pid=1&qos-enable=false&registry=zookeeper&release=2.7.2&timestamp=1560839021419, cause: Not found method \"getUserByLoginName\" in class org.apache.dubbo.rpc.service.GenericService.
org.apache.dubbo.rpc.RpcException: org.apache.dubbo.rpc.RpcException: Failed to invoke remote proxy method getUserByLoginName to registry://registry:2181/org.apache.dubbo.registry.RegistryService?application=demo&client=curator&dubbo=2.0.2&export=dubbo%3A%2F%2F172.18.0.6%3A10050%2Fcom.tyrfing.service.auth.TyrfingUserService%3Fanyhost%3Dtrue%26application%3Ddemo%26bean.name%3DServiceBean%3Acom.tyrfing.service.auth.TyrfingUserService%26bind.ip%3D172.18.0.6%26bind.port%3D10050%26deprecated%3Dfalse%26dubbo%3D2.0.2%26dynamic%3Dtrue%26generic%3Dtrue%26interface%3Dcom.tyrfing.service.auth.TyrfingUserService%26methods%3D*%26pid%3D1%26qos-enable%3Dfalse%26register%3Dtrue%26release%3D2.7.2%26service.filter%3Dtyrfing_tracing%26side%3Dprovider%26timestamp%3D1560839021419%26version%3D1.0.0&pid=1&qos-enable=false&registry=zookeeper&release=2.7.2&timestamp=1560839021419, cause: Not found method \"getUserByLoginName\" in class org.apache.dubbo.rpc.service.GenericService.
at com.tyrfing.tracing.TracingFilter.invoke(TracingFilter.java:125)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:55)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:92)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:48)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:81)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:96)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:148)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:41)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$CallbackRegistrationInvoker.invoke(ProtocolFilterWrapper.java:150)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:152)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:102)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:193)
at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.dubbo.rpc.RpcException: Failed to invoke remote proxy method getUserByLoginName to registry://registry:2181/org.apache.dubbo.registry.RegistryService?application=demo&client=curator&dubbo=2.0.2&export=dubbo%3A%2F%2F172.18.0.6%3A10050%2Fcom.tyrfing.service.auth.TyrfingUserService%3Fanyhost%3Dtrue%26application%3Ddemo%26bean.name%3DServiceBean%3Acom.tyrfing.service.auth.TyrfingUserService%26bind.ip%3D172.18.0.6%26bind.port%3D10050%26deprecated%3Dfalse%26dubbo%3D2.0.2%26dynamic%3Dtrue%26generic%3Dtrue%26interface%3Dcom.tyrfing.service.auth.TyrfingUserService%26methods%3D*%26pid%3D1%26qos-enable%3Dfalse%26register%3Dtrue%26release%3D2.7.2%26service.filter%3Dtyrfing_tracing%26side%3Dprovider%26timestamp%3D1560839021419%26version%3D1.0.0&pid=1&qos-enable=false&registry=zookeeper&release=2.7.2&timestamp=1560839021419, cause: Not found method \"getUserByLoginName\" in class org.apache.dubbo.rpc.service.GenericService.
at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:107)
at org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:56)
at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
at com.tyrfing.tracing.TracingFilter.invoke(TracingFilter.java:113)
... 26 more
Caused by: org.apache.dubbo.common.bytecode.NoSuchMethodException: Not found method \"getUserByLoginName\" in class org.apache.dubbo.rpc.service.GenericService.
at org.apache.dubbo.common.bytecode.Wrapper6.invokeMethod(Wrapper6.java)
at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)
at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:84)
... 29 more