IDEA在编辑时提示could not autowire
来源:互联网 发布:四大名助 综艺 知乎 编辑:程序博客网 时间:2024/06/08 23:55
在开发中我再applicationContext-dao.xml中加入了mapper扫描器
<!--mapper扫描器--> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <!--扫描包路径,如果需要扫描多个包,中间使用半角逗号隔开--> <property name="basePackage" value="com.qianlv.ssmdemo.mapper" /> <!--这里不用sqlSessionFactory是因为如果用会导致上面配置的dataSource失效--> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" /> </bean>
但是在编辑一个Service中注入mapper会提示could not autowire,但是可以正常执行的。
public class ItemsServiceImpl implements com.qianlv.ssmdemo.service.ItemsService{ @Autowired ItemsMapperCustom itemsMapperCustom; public List<ItemsCustom> findItemsList(ItemsQueryVo itemsQueryVo) throws Exception { return itemsMapperCustom.findItemsList(itemsQueryVo); }}我们需要改一下IDEA的设置
将最右边的Serverity改为Warning
2 3
- IDEA在编辑时提示could not autowire
- IDEA在编辑时提示could not autowire
- IDEA在编辑时提示could not autowire
- IDEA在编辑时提示could not autowire
- Could not autowire解决方法 INtellij IDEA @Autowired取消提示
- 解决Idea 出现 "Could not autowire.." 错误
- IntelliJ Idea取消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的错误提示
- IntelliJ Idea取消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的错误提示
- IntelliJ Idea解决Could not autowire. No beans of 'xxxx' type found的错误提示
- Could not autowire. No beans of 'xxxx' type found的错误提示(IntelliJ Idea)
- IntelliJ Idea解决Could not autowire. No beans of 'xxxx' type found的错误提示
- IntelliJ Idea取消Could not autowire. No beans of 'xxxx' type found的错误提示
- IntelliJ idea在Spring配置无错误时,装配对象出现 Could not autowire. no beans of "XXX" type found
- IntelliJ Idea取消Could not autowire. No beans of 'xxxx' type found的错误提示(其实不是错误)
- Move Zeroes
- java-反射初学(2)
- 深入理解JVM02--深入理解对象的创建、内存布局、访问定位
- word2vec (二) CBOW
- DFS
- IDEA在编辑时提示could not autowire
- php变量后加中括号
- 离骚
- DP————1017
- UVA14000 Lighting System Design
- 【LeetCode】290. Word Pattern
- BFS
- 注册中过滤敏感词汇
- iOS学习笔记-APP共享数据之UIPasteboard使用