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

网关转发同appName下的,是否支持注册名为url前缀的动态路由 #4568

Open
coolcoolercool opened this issue Oct 25, 2024 · 3 comments

Comments

@coolcoolercool
Copy link

之前使用的是nacos作为注册中心,是支持的,举个例子
http://localhost:8080/query_service_name/query/xxx
localhost:8080是网关的地址IP
query_service_name是应用服务注册在nacos的注册服务名,相当于service comb的service name
这样请求,在SpringCloud网关不加任何路由规则是可以请求成功的

现在改成service comb为注册中心了,但是这种方式直接报错,网关报错404找不到了
也试过如下请求方式,但是也是同样报错,
http://localhost:8080/appName:query_service_name/query/xxx

现在就是疑问,service comb支持这个功能吗,如果支持我该如何修改,还是版本问题?
请大佬指点

@liubao68
Copy link
Contributor

可以看看 DefaultEdgeDispatcher, 参考 https://servicecomb.apache.org/references/java-chassis/zh_CN/edge/by-servicecomb-sdk.html

@liubao68
Copy link
Contributor

BTW: 你是用的java chassis开发框架还是spring cloud? 上述答案是针对java chassis框架的,和service center没关系

@coolcoolercool
Copy link
Author

BTW: 你是用的java chassis开发框架还是spring cloud? 上述答案是针对java chassis框架的,和service center没关系

使用的是spring cloud,目前已经验证是支持动态路由的,3q anyway

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

2 participants