开发者社区 问答 正文

spring cloud feign Security消费端调用401?报错

在使用feign消费者调用提供者的时候 “返回认证” 报错
Full authentication is required to access this resource

 

详细错误
{"timestamp":1524018915085,"status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource","path":"/activity-provider-service/user/add/12312321"}

 

直接访问提供者是可以成功的,通过消费者调用提供者服务就会报这个错误401

如果关闭掉security认证是可以访问成功的

注册配置

提供者

调用者

展开
收起
爱吃鱼的程序员 2020-06-07 17:02:05 1891 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>你好!请问你解决了吗!</p>
                    
    
                        <p>在fegin 接口调用的时候 把 token带上</p>
    
    2020-06-07 17:02:20
    赞同 展开评论