使用feign远程调用
1)报错信息
A component required a bean of type ‘com.nd.ndmall.user.feign.OauthClientFeign’ that could not be found cloud
2)原因:没在启动类扫描feign 接口所在的包
3)解决方法:
加上@EnableFeignClients(“com.nd.ndmall.user.feign”)

本文介绍了在使用Feign进行远程调用时遇到的一个典型问题:由于启动类未扫描到Feign接口所在的包,导致组件无法找到。解决方法是在启动类中添加@EnableFeignClients注解,并指定Feign接口所在包路径。
使用feign远程调用
1)报错信息
A component required a bean of type ‘com.nd.ndmall.user.feign.OauthClientFeign’ that could not be found cloud
2)原因:没在启动类扫描feign 接口所在的包
3)解决方法:
加上@EnableFeignClients(“com.nd.ndmall.user.feign”)


被折叠的 条评论
为什么被折叠?