Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
陈贵 committed Mar 13, 2017
1 parent c9f22a8 commit e09eb6e
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@
* dubbo默认没有提供,只能标准化项目包名
* 形如 com.reapal.appname.serverName
*/
/**
* 解析dubbo Provider applicationName
- * dubbo默认没有提供,只能标准化项目包名
- * 形如 com.company.bu.serverName.api.XXXX
*/
public class DefaultServerNameProvider implements DubboServerNameProvider {
@Override
public String resolveServerName(RpcContext rpcContext) {
String interfaceName= rpcContext.getUrl().getPath();
String serverName = interfaceName.substring(interfaceName.lastIndexOf(".")+1);
return serverName;
String application = RpcContext.getContext().getUrl().getParameter("application");
return application;
}
}

0 comments on commit e09eb6e

Please sign in to comment.