自己写的Feign被调用提示404;以下为代码

Blade 未结 1 1129
med
med 2021-09-06 17:01

一、该问题的重现步骤是什么?

  1. Feign接口

    image.png


2. 调用

image.png

3.报错

2021-09-06 16:55:26.980  INFO 42448 --- [  XNIO-1 task-5] c.netflix.loadbalancer.BaseLoadBalancer  : Client: blade-user instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=blade-user,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null

2021-09-06 16:55:27.017  INFO 42448 --- [  XNIO-1 task-5] c.n.l.DynamicServerListLoadBalancer      : Using serverListUpdater PollingServerListUpdater

2021-09-06 16:55:27.142  INFO 42448 --- [  XNIO-1 task-5] c.n.l.DynamicServerListLoadBalancer      : DynamicServerListLoadBalancer for client blade-user initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=blade-user,current list of Servers=[192.168.31.79:8102],Load balancer stats=Zone stats: {unknown=[Zone:unknown; Instance count:1; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;]

},Server stats: [[Server:192.168.31.79:8102; Zone:UNKNOWN; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0]

]}ServerList:com.alibaba.cloud.nacos.ribbon.NacosServerList@5899fdac

2021-09-06 16:55:29.250  INFO 42448 --- [  XNIO-1 task-5] c.netflix.loadbalancer.BaseLoadBalancer  : Client: mrhr-rsgl instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=mrhr-rsgl,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null

2021-09-06 16:55:29.260  INFO 42448 --- [  XNIO-1 task-5] c.n.l.DynamicServerListLoadBalancer      : Using serverListUpdater PollingServerListUpdater

2021-09-06 16:55:29.299  INFO 42448 --- [  XNIO-1 task-5] c.n.l.DynamicServerListLoadBalancer      : DynamicServerListLoadBalancer for client mrhr-rsgl initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=mrhr-rsgl,current list of Servers=[192.168.31.79:8111],Load balancer stats=Zone stats: {unknown=[Zone:unknown; Instance count:1; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;]

},Server stats: [[Server:192.168.31.79:8111; Zone:UNKNOWN; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0]

]}ServerList:com.alibaba.cloud.nacos.ribbon.NacosServerList@7e8771f8

2021-09-06 16:55:29.423 ERROR 42448 --- [  XNIO-1 task-5] o.s.core.cloud.feign.BladeFeignFallback  : BladeFeignFallback:[com.hr.rsgl.dept.feign.IRsglDeptClient.getRsglDeptList] serviceId:[mrhr-rsgl] message:[[404 Not Found] during [GET] to [http://mrhr-rsgl/client/rsgl-dept-list?deptIds=111&tenantId=000000] [IRsglDeptClient#getRsglDeptList(String,String)]: [{"code":404,"success":false,"data":{},"msg":"No handler found for GET /client/rsgl-dept-list"}]]

image.png

image.png

image.png

image.png

二、你期待的结果是什么?实际看到的又是什么?

完美解决问题

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

商业授权版2.8.2;windows10

四、请提供详细的错误堆栈信息,这很重要。


五、若有更多详细信息,请在下面提供。

1条回答
  •  med
    med (楼主)
    2021-09-06 17:54

    已经可以了

    0 讨论(1)
提交回复