Consider defining a bean of type ‘cn.itcast.feign.clients.UserClient‘ in your configuration.解决方案
Consider defining a bean of type 'cn.itcast.feign.clients.UserClient' in your configuration.解决方案
- Feign启动出现的问题
- 解决方案
- 方案一:指定Feign应该扫描的包
- 方案二:指定需要加载的Client接口
Feign启动出现的问题
下面展示 启动时候的错误
。
***************************
APPLICATION FAILED TO START
***************************Description:Field userClient in cn.itcast.order.service.OrderService required a bean of type 'cn.itcast.feign.clients.UserClient' that could not be found.The injection point has the following annotations:- @org.springframework.beans.factory.annotation.Autowired(required=true)Action:Consider defining a bean of type 'cn.itcast.feign.clients.UserClient' in your configuration.Process finished with exit code 1
解决方案
方案一:指定Feign应该扫描的包
@EnableFeignClients(basePackages = "cn.itcast.feign.clients")
方案二:指定需要加载的Client接口
@EnableFeignClients(clients = {UserClient.class})
Consider defining a bean of type ‘cn.itcast.feign.clients.UserClient‘ in your configuration.解决方案相关推荐
- SpringBoot:Consider defining a bean of type 'com.wzw.blog.mapper.UserMapper' in your configuration.
今天使用SpringBoot整合Mybatis时遇到一个错误. *************************** APPLICATION FAILED TO START ************ ...
- Consider defining a bean of type ‘com.xg.stupro.service.StudentService‘ in your configuration.
1.运行sprring boot项目时,出现这个错误:Consider defining a bean of type 'com.xg.stupro.service.StudentService' i ...
- Consider defining a bean of type ‘com.netflix.client.config.IClientConfig‘ in your configuration
如果在微服务中用远程调用的时候,出现空指针异常,建议参考方法2. 在微服务项目中,启动一个springboot项目时,报错信息如下: Description:Parameter 0 of method ...
- SpringBoot启动报错Consider defining a bean of type ‘com.test.springmvc.dao.xx‘ in your configuration.
报错信息如下: Description:Field userDao in com.test.springmvc.service.impl.UserServiceImpl required a bean ...
- Consider defining a bean of type ‘com.nclg.mall.service.AdminService‘ in your configuration.
问题描述 使用spring boot分模块开发时启动application出现错误 Consider defining a bean of type 'com.nclg.mall.service.Ad ...
- SpringBoot Consider defining a bean of type 'com.xxx.xxx.dao.UserDao' in your configuration.
SpringBoot 遇到的问题 遇到错误提示 required a bean of type 'com.xxx.xxx.dao.UserDao' that could not be found. 但 ...
- Consider defining a bean of type 'com.xxx.service.impl.xxxImpl' in your configuration
面向接口编程,把Service层定义为接口,然后用另外一个类去实现这个接口,使用spring boot启动时报错 项目结构: controller层注入如下 @Autowired private Us ...
- Consider defining a bean of type 'com.cxh.common.service.OrderService' in your configuration.怎么解决呢
我们有时运行项目会出现Field orderService in com.cxh.consumer.web.OrderController required a bean of type 'com.c ...
- Consider defining a bean of type ‘com.luyao.guyue_demo.dao.UserDAO‘ in your configuration.
出现如下报错的原因是,没有在方法入口GuyueDemoApplication添加@MapperScan(开启包扫描)注解,添加该注解即可.
最新文章
- kafka springboot配置_springboot 将日志导入kafka配置文件 logbackspring.xml(多环境)
- 常用日志门面和日志实现
- 光流 | 光流算法对比:Farneback、Horn-Schunck、Lucas-Kanade、Lucas-Kanade derivative of Gaussian(附Matlab与C++代码)
- 使用代码获得table whered use list
- 《需求规格说明书》业务描述活动图
- 2015/04/01 RHCS
- JavaScript:学习笔记(7)——VAR、LET、CONST三种变量声明的区别
- 来自微信官方:微信支付跨平台软件架构首次曝光
- 移动通信核心网技术总结(五)IMS的信令流程及VoLTE的实现
- 感谢Python,让我又在同学面前装了一次逼
- wav用matlab打不开,Matlab如何读取wav文件,为什么wavread不行啊
- Win7开机提示任务管理器已停止工作解决方法
- 【深度学习】YOLOv7目标检测模型使用记录 yolov7-tiny
- PySide2学习总结(三)QtWidgets和QML
- python可视化---阶梯图step()
- DS-5 csat简单使用-dump memory
- 嵌入式软件工程师都在开发什么?
- 把Vue项目打包为桌面应用(nwjs)
- openFrameworks实现的简单坦克对战游戏-Tank War
- 小福利,用excel制作旋风图,小狗图和漏斗图