You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Can @Method annotation provide more possibilities to control which @Method ultimately takes effect with minimal granularity, including on methods of classes using @DubboService annotation, methods of parent classes, and abstract methods of interfaces #14927
I am sure that all the content I provide is in English.
Search before asking
I had searched in the issues and found no similar feature requirement.
Apache Dubbo Component
Java SDK (apache/dubbo)
Descriptions
Can @method annotation provide more possibilities to control which @method ultimately takes effect with minimal granularity, including on methods of classes using @DubboService annotation, methods of parent classes, and abstract methods of interfaces.
And consider adding wildcard characters to match the methods.Or add an annotation for configuration.
for example:
@DubboService(interfaceClass = TestGateway.class, version = "1.0.0", group = "public",
methods = {
@Method(name = "create*", retries = 5, timeout = ,6000)
}
)
public class TestGatewayImpl implements TestGateway {
@Override
public Response create(String t) {
return Response.buildSuccess();
}
@Override
public Response createOther(String t) {
return Response.buildSuccess();
}
@Override
@Method(retries = 1, timeout=500))
public Response createTest(String t) {
return Response.buildSuccess();
}
}
In the above example, the retry count for create is 5, with a timeout of 6000 milliseconds. The retry count for create Other is 2, with a timeout of 1000 milliseconds. The retry count for create Test is 1, with a timeout of 500 milliseconds
Related issues
No response
Are you willing to submit a pull request to fix on your own?
Yes I am willing to submit a pull request on my own!
Activity
AlbumenJ commentedon Nov 25, 2024
Would you like to support it?
lanxi0 commentedon Nov 25, 2024
Yes, I'd be happy to help with the development of this feature.
Is there anything I should pay attention to?
AlbumenJ commentedon Nov 29, 2024
You can submit PR directly. If there are any problems, we will raise them during the review process.
Support wildcard method name matching in StringUtils and AbstractInte…
Restore full StringUtils with wildcard matchers (apache#14927)
Add MethodConfigWildcardTest for wildcard method resolution (apache#1…
Add wildcard unit tests to StringUtilsTest (apache#14927)
Resolve wildcard method configs with exact-match precedence in Abstra…
Expand wildcard method configs in ReferenceConfig (apache#14927)
Add wildcard matching helpers hasWildcard/isWildcardMatch to StringUt…
Expand wildcard method configs in ServiceConfig (apache#14927)
Validate wildcard method name patterns in ConfigValidationUtils (apac…
Validate wildcard method name patterns in ConfigValidationUtils (apac…
Apply spotless formatting to wildcard method config changes (apache#1…
Restore unchanged code in ConfigValidationUtils while keeping wildcar…