Consider defining a bean of type 'xxx' in your configuration异常解决方法
问题描述
博主今天编写代码的时候遇到了一个这样的错误(如下图)
第一句异常信息意思是:
com.atguigu.gmall.utils.config中的字段authInterceptor。WebMvcConfiguration需要一个类型为“com.atguigu.gmall.utils.interceptor.AuthInterceptor”的bean,但是找不到它。
通过这句话,很显然就知道这是没有注入到spring引起的
解决方法
1.检查需要用到的类有没有添加注解
博主就是在配置类上少了一个@Component注解引发的错误 各位在编写代码的时候也要细心一点了
Consider defining a bean of type 'xxx' in your configuration异常解决方法相关推荐
- springboot 工程启动报错之Consider defining a bean of type ‘XXX’ in your configuration.
一.前言: 使用springboot自动注入的方式搭建好了工程,结果启动的时候报错了!!!,错误如下图: Description:Field userEntityMapper in com.xxx.x ...
- Consider defining a bean of type `xxx` in your configuration问题解决
Consider defining a bean of type `xxx` in your configuration问题解决 参考文章: (1)Consider defining a bean o ...
- springboot启动报错: Consider defining a bean of type ‘XXX‘ in your configuration
Consider defining a bean of type 'XXX' in your configuration 出现这个错误,要看看你是否用到了某些组件,但是启动类上没加相应的注解.比如说我 ...
- 【无法找到FeignClient的bean】 Consider defining a bean of type ‘xxx‘ in your configuration.
Consider defining a bean of type 'xxx' in your configuration. 错误原因:该FeignClient接口在其他jar包中,@EnableFei ...
- SpringBoot 出现 Consider defining a bean of type ‘xxx‘ in your configuration 问题解决方案
大家好,我是trikey. 最近在编写练手项目代码时,出现了Consider defining a bean of type 'xxx' in your configuration 问题,这里简单记录 ...
- 解决启动报错Consider defining a bean of type ‘xxx‘ in your configuration.
解决启动报错Consider defining a bean of type 'xxx' in your configuration. 报错截图 解决方法:查看注解是否同时存在@AllArgsCons ...
- No qualifying bean of type xxx‘ available 的一种解决方法
No qualifying bean of type xxx' available 的一种解决方法 参考文章: (1)No qualifying bean of type xxx' available ...
- Consider defining a bean of type ‘xxx‘ in your configuration
当你的spring web项目运行时突然报Consider defining a bean of type 'xxx' in yourconfiguration这个样的异常时,不妨试试以下骚操作解决问 ...
- [SpringBoot报错]Consider defining a bean of type ‘xxx‘ in your configuration, NoSuchBeanDefinitionExce
报错详情: Error starting ApplicationContext. To display the conditions report re-run your application wi ...
最新文章
- python3 socket send sendall 区别
- 【Android 逆向】获取安装在手机中的应用的 APK 包 ( 进入 adb shell | 获取 root 权限 | 进入 /data/app/ 目录 | 拷贝 base.apk 到外置存储 )
- JS function立即调用的几种写法
- NCMMSC2021喊你开赛!汉语长短视频直播语音关键词竞赛正式启动!
- HybridTime - Accessible Global Consistency with High Clock Uncertainty
- activiti 为什么需要采用乐观锁?
- axios异步请求数据的简单使用
- 前端学习(1855)vue之电商管理系统电商系统之安装mysql出现VCRUNTIME140_1.dll
- 轻松理解牛顿迭代法且用其求平方根
- vue为基座微前端嵌入html,使用Vue CSR的微前端实现方案实践
- 安装非认证的chrome插件和设置文件夹的权限
- 手把手教你写一个java的orm(二)
- linux mysql数据库升级_Linux升级mysql到5.7
- MFC控件之cimagelist,加载不上位图
- 解决用SSIS组件导入CSV文件时,把CSV文件名一起插入到数据库表中的问题
- Windows——重建 MBR(Master Boot Record)
- 设计模式-2-抽象工厂方法
- 聊聊如何实施负载均衡
- google map 看经度和纬度
- 新知实验室 TRTC实时音视频