Could not autowire. No beans of 'xxxMapper' type found.
2017-11-10 17:38
946 查看
作为一名刚开始使用idea的新手,最近在使用maven+springMVC框架时遇到了这样一个问题:Could not autowire. No beans of ‘xxxMapper’ type found.
这是在实现xxxService接口时,自动注入xxxMapper时,出现的错误。
(╯‵□′)╯︵┴─┴
看了很
4000
久的代码,实在是没发现问题。甚至把代码拿到eclipes跑,没问题。
┬─┬ ノ( ’ - ‘ノ) {摆好摆好)
(再掀一次} (╯°Д°)╯︵ ┻━┻
当然此时已经意识到不是代码的问题,灵机一动一百度果然如此。(:з」∠)
好了不皮了,解决方法如下:
解决方法来源于:http://blog.csdn.net/u012453843/article/details/54906905
这是在实现xxxService接口时,自动注入xxxMapper时,出现的错误。
(╯‵□′)╯︵┴─┴
package com.zm.mlog.service.impl; import com.zm.mlog.mapper.AdminMapper; import com.zm.mlog.service.AdminService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service("adminService") public class AdminServiceImpl implements AdminService { @Autowired private AdminMapper adminMapper; }
看了很
4000
久的代码,实在是没发现问题。甚至把代码拿到eclipes跑,没问题。
┬─┬ ノ( ’ - ‘ノ) {摆好摆好)
(再掀一次} (╯°Д°)╯︵ ┻━┻
当然此时已经意识到不是代码的问题,灵机一动一百度果然如此。(:з」∠)
好了不皮了,解决方法如下:
解决方法来源于:http://blog.csdn.net/u012453843/article/details/54906905
相关文章推荐
- Could not autowire. No beans of 'UserMapper' type found.
- IDEA引入dao接口,Could not autowire. No beans of 'UserMapper' type found
- idea 出现Could not autowire. No beans of 'xxxxMapper' type found. 安装 Mybatis Plugin 插件
- mapper提示Could not autowire. No beans of … type found?
- mapper提示Could not autowire. No beans of … type found?
- idea中mybatis+spring boot, mapper 提示Could not autowire. No beans of … type found解决办法
- Could not autowire. No beans of 'UserMapper' type found.
- 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 'FunctionService' type found.
- IntelliJ Idea取消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 'xxxx' type found的错误提示(IntelliJ Idea)
- IntelliJ idea在Spring配置无错误时,装配对象出现 Could not autowire. no beans of "XXX" type found
- mybatis+spring boot, mapper 提示Could not autowire. No beans of … type found
- mybatis Field xxxMapper in xxxx required a bean of type 'XXXMapper' that could not be 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的错误提示