IntelliJ Idea取消Could not autowire. No beans of 'xxxx' 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 'xxxx' type found的错误提示的更多相关文章
- 【转】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 的错误提示
IntelliJ Idea 解决 Could not autowire. No beans of 'xxxx' type found 的错误提示哈,在使用 @Autowired 时,今天又遇一坑,这俩 ...
- 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的错误提示
问题描述 在idea中进行开发时,经常会遇见Could not autowire. No beans of 'xxxx' type found的错误提示,这样的是不影响程序编译和运行的,但是看起来会很 ...
- Could not autowire. No beans of 'xxxx' type found的错误
在Idea的spring工程里,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示.但程序的编译和运行都是没有问题的,这个错误提示并 ...
- IntelliJ Idea设置Could not autowire. No beans of 'xxx' type found
1.问题描述 在Idea的spring工程里,经常会遇到Could not autowire. No beans of ‘xxxx’ type found的错误提示.但程序的编译和运行都是没有问题的, ...
- SpringBoot学习- 7、问题Could not autowire. No beans of 'xxxx' type found处理
SpringBoot学习足迹 这个问题网上有好多同学都提到这个问题,代码可以运行,但是就是有红线,强迫症不能忍 自己试验下 1.增加一个final编译一下,再删掉就不会出红线了 public clas ...
- 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 '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 ...
随机推荐
- AutoCompleteTextView ArrayAdapter
AutoCompleteTextView 继承于EditText,拥有EditText所有属性和方法 在输入框中输入我们想要输入的信息就会出现其他与其相关的提示信息 首先在activity_mai ...
- SQL优化(Oracle)
(转)SQL优化原则 一.问题的提出 在应用系统开发初期.因为开发数据库数据比較少.对于查询SQL语句,复杂视图的的编写等体会不出SQL语句各种写法的性能优劣,可是假设将应用系统提交实际应用后,随着数 ...
- jboss7 加载module过程
1. 调试类: org.jboss.as.server.Main的main方法 断点: Module.registerURLStreamHandlerFactoryModule(Module.getB ...
- Winform Textbox实现滚动条始终在最下面
在用textbox时,实现一些信息追加时,要使滚动条始终呆在最下面的实现方法. 以textbox1为例,事件TextChanged中执行以下代码即可 private void textBox1_Tex ...
- 线段树---HDU1394Minimum Inversion Number
此题和上题略有不同,但是大体差不多,不过要把题意转换过来,题目大体意思为, 输入n, 也就是n个数,这些数为0 - (n-1), 这些数刚开始给定输入的顺序, 然后求他的逆序数,然后接着把第一个移到这 ...
- SVN Git 设置忽略目录 大全
eclipse中SVN设置 用svn控制版本,svn本身是不会识别哪些该传,哪些不该传,这就导致有些关于路径的东西(比如拓展jar的路径)也被上传了,而当别人下载后,那个路径对于这个人可能完全不存在, ...
- 关于HttpServlet和Servlet以及doPost和doGet关系
这两天在看Servlet和Jsp,spring太难了,还是先看看基础,只怪自己太弱了. Servlet是一个接口,本身定义的是一种网络服务,HttpServlet是已经实现了Servlet接口,也就是 ...
- Linux系统文本命令快速登录与退出
Linux是一个多用户的操作系统,用户要使用该系统,首先必须登录系统,使用完系统后,必须退出系统.用户登录系统时,为了使系统能够识别自己,必须输入用户名和密码,经系统验证无误后方能进入系统.在系统安装 ...
- 修改SELinux设置,使vsftp在enforcing security enhance模式下正常运行
开了SELinux和防火墙,没想到引出了vsftp的问题.FTP登录报错:500 OOPS: cannot change directory.下面来看看产生这个问题的原因和对策. 首先,分析一下冲突原 ...
- 堆/栈的比较 以及 malloc/new动态内存的开辟
堆与栈的比较:1.申请方式(1)栈(satck):由系统自动分配.(2)堆(heap):需程序员自己申请(c:调用malloc,realloc,calloc申请 free 来释放),并指明大小,并由程 ...