IntelliJ Idea设置Could not autowire. No beans of 'xxx' type found
1.问题描述
在Idea的spring工程里,经常会遇到Could not autowire. No beans of ‘xxxx’ type found的错误提示。但程序的编译和运行都是没有问题的,这个错误提示并不会产生影响。但红色的错误提示在有些有强迫症的程序员眼里,多多少少有些不太舒服。
2.原因
spring auto scan配置,在编辑情况下,无法找不到对应的bean,于是提示找不到对应bean的错误。常见于mybatis的mapper,如下:
- <!-- mapper scanner configurer -->
- <bean id="mapperScannerConfig" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="com.adu.spring_test.mybatis.dao" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
- </bean>
3.解决方案
降低Autowired检测的级别,将Severity的级别由之前的error改成warning或其它可以忽略的级别。
IntelliJ Idea设置Could not autowire. No beans of 'xxx' type found的更多相关文章
- IntelliJ Idea 解决 Could not autowire. No beans of 'xxxx' type found 的错误提示
IntelliJ Idea 解决 Could not autowire. No beans of 'xxxx' type found 的错误提示哈,在使用 @Autowired 时,今天又遇一坑,这俩 ...
- IntelliJ Idea取消Could not autowire. No beans of 'xxxx' type found的错误提示
1.问题描述 在Idea的spring工程里,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示.但程序的编译和运行都是没有问题的, ...
- IntelliJ Idea解决Could not autowire. No beans of 'xxxx' type found的错误提示
本文转自:http://blog.csdn.net/u012453843/article/details/54906905 1.问题描述 在Idea的spring工程里,经常会遇到Could not ...
- 【转】IntelliJ Idea取消Could not autowire. No beans of 'xxxx' type found的错误提示
1.问题描述 在Idea的spring工程里,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示.但程序的编译和运行都是没有问题的, ...
- IDEA出现Could not autowire. No beans of 'xxx' type found.解决
Plan A File → Project Structure... Facets → Spring → 右键删除即可 Plan B File → Settings → Editor → Inspec ...
- IntelliJ Idea如何解决Could not autowire. No beans of 'xxxx' type found的错误提示
问题描述 在idea中进行开发时,经常会遇见Could not autowire. No beans of 'xxxx' type found的错误提示,这样的是不影响程序编译和运行的,但是看起来会很 ...
- Could not autowire. No beans of 'TbItemMapper' type found. less... (Ctrl+F1) Checks autowiring prob
Intellij Idea开发工具在@Autowired或者@Resource注入XxxMapper接口时报如下错误: Could not autowire. No beans of 'TbItemM ...
- Could not autowire. No beans of 'xxxx' type found的错误
在Idea的spring工程里,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示.但程序的编译和运行都是没有问题的,这个错误提示并 ...
- Could not autowire. No beans of 'TbAssetsMapper' type found. less... (Ctrl+F1) Inspection info:Checks autowiring problems in a bean class.
报错:Could not autowire. No beans of 'TbAssetsMapper' type found. less... (Ctrl+F1) Inspection info:Ch ...
随机推荐
- 剑指offer(1)
1.二维数组中的查找在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序.请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数. public ...
- MySQL5.7(5.6)GTID环境下恢复从库思路方法(转发)
要讨论如何恢复从库,我们得先来了解如下一些概念: GTID_EXECUTED:它是一组包含已经记录在二进制日志文件中的事务集合 GTID_PURGED:它是一组包含已经从二进制日志删除掉的事务集合. ...
- workerman vmstat服务器状态监控服务
转载出自 :http://www.workerman.net/workerman-vmstat workerman vmstat服务器状态监控服务 vmstat 命令可以展现服务器的CPU使用率,内存 ...
- JAVA面向对象编程之购物车界面的设计与功能的实现
1.小组成员及分工 小组成员 负责工作 兰泽祥 负责总体界面.Git代码库 吴修恩 负责MVC模式.类名包名的规范化 2.Git 仓库地址 仓库地址:https://gitee.com/lanzexi ...
- [蓝桥杯]ALGO-101.算法训练_图形显示
问题描述 编写一个程序,首先输入一个整数,例如5,然后在屏幕上显示如下的图形(5表示行数): * * * * * * * * * * * * * * * 题目描述 代码如下: #include < ...
- Memcached 集群架构方面的问题 [z]
集群架构方面的问题 memcached是怎么工作的? Memcached的神奇来自两阶段哈希(two-stage hash).Memcached就像一个巨大的.存储了很多<key,v ...
- Dubbo(5)优化:接口抽取以及依赖版本统一
优化点: 1.在上面provider和consumer程序中都存在DemoProviderService接口了,两个项目中存在同样的东西,代码多余以及不方便管理: 正式的项目中存在很多的接口的,将统一 ...
- 滚动效果marquee的用户体验不好,很少被用到,一般用jquery替代
滚动效果marquee的用户体验不好,很少被用到,一般用jquery替代
- Linux下的文件操作——基于文件描述符的文件操作(2)
文件描述符的复制 MMAP文件映射 ftruncate修改文件大小 文件描述符的复制 系统调用函数dup和dup2可以实现文件描述符的复制,经常用来重定向进程的stdin(0), stdout(1 ...
- keras LSTM学习实例
1. 购物时间预测 http://www.cnblogs.com/arkenstone/p/5794063.html https://github.com/CasiaFan/time_seires_p ...