Linyuzai / concept

封装了一些常用组件,走过路过不要错过哦
Apache License 2.0
380 stars 113 forks source link

指定服务地址未生效 #4

Closed jc5337207 closed 1 year ago

jc5337207 commented 1 year ago
image image

指定服务地址未生效,请问还需要其他配置吗?

Linyuzai commented 1 year ago
image image

指定服务地址未生效,请问还需要其他配置吗?

你看下控制台有没有打印相关的日志

jc5337207 commented 1 year ago

控制台有打印,是不是这个匹配路径的问题

image
Linyuzai commented 1 year ago

控制台有打印,是不是这个匹配路径的问题

image

你在路由上配置的是system为前缀的接口,/user/list肯定是匹配不上的

jc5337207 commented 1 year ago

了解了,这边在做路由的时候把前缀全部默认去掉了

jc5337207 commented 1 year ago

![Uploading image.png…]() 那请问配置了stripPrefix=1后能够使用您这个库么?

jc5337207 commented 1 year ago
image
Linyuzai commented 1 year ago
image

理论上应该可以,不过我没有单独测试过,路由规则是SpringGateway解析的,我这边只是处理解析之后的service和uri,并不是直接把前缀去掉,所以可视化页面上会有一列匹配服务用于指定对应的服务

jc5337207 commented 1 year ago

最终还是配置了 spring.cloud.nacos.discovery.group