dubbo-admin icon indicating copy to clipboard operation
dubbo-admin copied to clipboard

当 dubbo 服务进行分组时, 在服务列表界面点击会报错

Open huhu-sky opened this issue 8 years ago • 11 comments

javax.servlet.ServletException: Circular view path []: would dispatch back to the current handler URL [/governance/services/b/com.tenxcloud.example.dubbos.CityService/] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

huhu-sky avatar Jul 02 '18 13:07 huhu-sky

can you provide an URL address

nzomkxia avatar Jul 09 '18 02:07 nzomkxia

根据ServicesController这里定义的URI:/services/$service/providers 在dubbo服务分组时拿到的$service其实是包含了group的URI,但是并没有做包含group的URI映射处理。 比如group是news,则这个URL就像下面的样子 http://xxx.xxx.xxx.xxx/governance/services/news/com.xxx.xxx.facade.service.IconFacede:1.0/providers 我试着在2.5.3的war包里面运行,在服务分组的情况下也是正常的。

soonway avatar Jul 14 '18 08:07 soonway

me too 啊

wangzhangxing avatar Jul 19 '18 02:07 wangzhangxing

我也遇到了,服务分组了以后就不行.

tanyouxiang avatar Jul 19 '18 03:07 tanyouxiang

the root cause is that the "ServiceKey" is generated by group + "/"+interface+":"+version ; the source code located at: com/alibaba/dubbo/common/URL.java:1211

public String getServiceKey() {
        String inf = getServiceInterface();
        if (inf == null) return null;
        StringBuilder buf = new StringBuilder();
        String group = getParameter(Constants.GROUP_KEY);
        if (group != null && group.length() > 0) {
            buf.append(group).append("/");
        }
        buf.append(inf);
        String version = getParameter(Constants.VERSION_KEY);
        if (version != null && version.length() > 0) {
            buf.append(":").append(version);
        }
        return buf.toString();
    }

So, I suggest: "ServiceKey" = group + ":"+interface+":"+version

any idea ?

yinghuzhu avatar Aug 02 '18 12:08 yinghuzhu

I meet this problem too!

xllove-moon avatar Sep 11 '18 03:09 xllove-moon

The ServiceKey starts with a '/' which will conflict with the url pattern

cookerzhu avatar Oct 29 '18 02:10 cookerzhu

这个问题有解决的办法吗? @nzomkxia

zhaobingss avatar Nov 13 '18 14:11 zhaobingss

The same as this error. How to solve it?

zhuSilence avatar Dec 10 '18 03:12 zhuSilence

这个问题现在解决了吗? @nzomkxia

wanxx284105892 avatar Apr 26 '20 02:04 wanxx284105892

This problem has been fixed by #669. Please feel free to reopen it if you have any question.

KeRan213539 avatar Mar 04 '21 05:03 KeRan213539