【转】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或其它可以忽略的级别。
转自:https://www.cnblogs.com/waterystone/p/6214212.html
【转】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 ...
随机推荐
- Django详细介绍
课程简介: Django流程介绍 Django url Django view Django models Django template Django form Django admin (后台数据 ...
- 安装express.js(NODEJS框架)
express.js是nodejs的一个MVC开发框架,并且支持jade等多种模板.下面简单来说说express的安装和app.js文件的配置,然后在今后的教程中一步一步使用express.js搭建个 ...
- leetcode:Median of Two Sorted Arrays分析和实现
这个问题的大意是提供两个有序的整数数组A与B,A与B并集的中间数.[1,3]与[2]的中间数为2,因为2能将A与B交集均分.而[1,3]与[2,4]的中间数为2.5,取2与3的平均值.故偶数数目的中间 ...
- Composert 的命令
(1) php artisan ----查看所有的命令帮助 (2) php artisan make:controller StudentController ----创建一个控 ...
- 通明讲JDBC(一)–认识JDBC
本章记录了jdbc的简单使用方式! 0,jdbc的作用 1,jdbc入门准备工作 2,jdbc注册驱动 3,使用jdbc对数据库CRUD 0,jdbc的作用 与数据库建立连接.发送操作数据库的语句并处 ...
- Solidity 合约调用合约
原文地址:https://medium.com/@k3no/making-a-birthday-contract-858fd3f63618 先将datetime合约部署:https://github. ...
- 调用req.getParameter方法出现中文乱码(全是问号???)
在java开发中,如果编码配置不统一,很容易出现中文乱码的情况,这里就记录下自己遇到的调用req.getParameter方法出现中文乱码,并解决这一情况的方法 注意修改以下几个地方 1.jsp页面中 ...
- python 添加日期
import pandas as pd applydata['apply_time'] = pd.to_datetime(applydata.apply_time)# applydata.apply_ ...
- bootstrap三列布局
<!DOCTYPE html><html lang="zh-cn"><head><meta charset="utf-8&quo ...
- phpmyadmin安全预防
头疼的安全 之前服务器总是本人黑,千疮百孔,只能一步步的去做一些安全防范,如何防范自然先从如何渗透开始. 文章及建议 前段时间看到了个phpmyadmin提权的教程,很多人都说现在那里还有root帐号 ...