Skip to content
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

ServiceNameMapping didn't work when registry-type=service. #7722

Closed
horizonzy opened this issue May 10, 2021 · 0 comments
Closed

ServiceNameMapping didn't work when registry-type=service. #7722

horizonzy opened this issue May 10, 2021 · 0 comments

Comments

@horizonzy
Copy link
Member

Environment

  • Dubbo version: master

What actually happens?

public void exported() {
List<URL> exportedURLs = this.getExportedUrls();
exportedURLs.forEach(url -> {
// dubbo2.7.x does not register serviceNameMapping information with the registry by default.
// Only when the user manually turns on the service introspection, can he register with the registration center.
boolean isServiceDiscovery = SERVICE_REGISTRY_PROTOCOL.equals(url.getProtocol());
if (isServiceDiscovery) {
Map<String, String> parameters = getApplication().getParameters();
ServiceNameMapping.getExtension(parameters != null ? parameters.get(MAPPING_KEY) : null).map(url);
}
});
// dispatch a ServiceConfigExportedEvent since 2.7.4
dispatch(new ServiceConfigExportedEvent(this));
}

line_219 judgement exist problem. It's communication protocol, not registry protocol.

@horizonzy horizonzy changed the title ServiceMappingService didn't work when registry-type=service. ServiceNameMapping didn't work when registry-type=service. May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant