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 ...
随机推荐
- C/C++中带可变参数的函数
1.带可变参数的函数由来 当函数中的参数个数不确定时,这时候就需要带可变参数的函数! 如我们经常使用的C库函数printf()实际就是一个可变参数的函数, 其原型为: int printf( cons ...
- 时钟分频方法---verilog代码
时钟分频方法---verilog代码 本文以SDI播出部分的工程为例,来说明一种时钟分频的写法.SD-SDI工程中播出时钟tx_usrclk为148.5MHz,但tx_video_a_y_in端的数据 ...
- 阅读<<HDMI 1.4/2.0 Transmitter Subsystem V2.0>>笔记
阅读<<HDMI 1.4/2.0 Transmitter Subsystem V2.0>>笔记 1.Subsystem Block Diagram 2.HDMI TX Subs ...
- android 逆向
用到两个工具 :dex2jar和jd-gui 1,重命名ContactManager.apk为ContactManager.zip并解压得到文件classes.dex: 2,解压dex2jar-0.0 ...
- ef 吐糟
方法:从dbcontext到objectcontext DbContext及其相关的API是EF4.1中一大新特性.简单说,DbContext就是之前EF的核心类ObjectContext的抽象封装. ...
- win7 上运行 php7 +
win7 安装 php7+ 很简单, 这里不赘述 如何在phpstudy 添加 php7 百度也很容易找到. 但是在 php 7 运行的时候总是报0x0000007 或者 缺少 .dll 文 ...
- Ubuntu使用操作记录/笔记
1.如何取得图形界面下的ROOT权限? 先alt+f2,然后 gksu nautilus 或者 kdesudo dolphin 2.如何使用Qt插件在Qt中进行ROS开发 http://blog.cs ...
- bzoj4183: tree
Description 自底向上模拟,原地操作以节省空间 #include<bits/stdc++.h> unsigned n,a,b,c,v[],mx,ans=; int main(){ ...
- springboot工程添加404页面
首先在/src/main/resources下创建文件夹/public/error 在文件夹里创建html页面,jsp页面不可以. <html> <body> <img ...
- docker下centos安装ping命令
https://blog.csdn.net/king_gun/article/details/78423115 [问题] 从docker hub上拉取到则镜像centos:6.7在执行ping命令是报 ...