New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
标签路由问题 #7519
Labels
help wanted
Everything needs help from contributors
Comments
检查是否同时使用了动态打标方式,动态打标优先级更高。 |
customer 如何调用的? |
If you haven’t received feedback for a long time, close the issues first, and reopen it if you have any problems. |
@AlbumenJ @CrazyHZM 这个问题简单验证了一下,的确是不生效啊。
private <T> List<Invoker<T>> filterUsingStaticTag(List<Invoker<T>> invokers, URL url, Invocation invocation) {
List<Invoker<T>> result;
// Dynamic param
String tag = StringUtils.isEmpty(invocation.getAttachment(TAG_KEY)) ? url.getParameter(TAG_KEY) :
invocation.getAttachment(TAG_KEY);
// Tag request
if (!StringUtils.isEmpty(tag)) {
// invoker.getUrl().getParameter(TAG_KEY)这里拿不到值的,详见#9512
result = filterInvoker(invokers, invoker -> tag.equals(invoker.getUrl().getParameter(TAG_KEY)));
if (CollectionUtils.isEmpty(result) && !isForceUseTag(invocation)) {
result = filterInvoker(invokers, invoker -> StringUtils.isEmpty(invoker.getUrl().getParameter(TAG_KEY)));
}
} else {
result = filterInvoker(invokers, invoker -> StringUtils.isEmpty(invoker.getUrl().getParameter(TAG_KEY)));
}
return result;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
java -jar xxx-provider.jar -Ddubbo.provider.tag={the tag you want, may come from OS ENV}
请问我用的2.7.8版本测试,没有生效?
The text was updated successfully, but these errors were encountered: