zoukankan      html  css  js  c++  java
  • IDEACould not autowire. No beans of 'xxxMapper' type found.

    作为一名刚开始使用idea的新手,最近在使用maven+springMVC框架时遇到了这样一个问题:Could not autowire. No beans of ‘xxxMapper’ type found.
    这是在实现xxxService接口时,自动注入xxxMapper时,出现的错误。
    (╯‵□′)╯︵┴─┴

    package com.zm.mlog.service.impl;IDEA
    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;
    }

    看了很久的代码,实在是没发现问题。甚至把代码拿到eclipes跑,没问题。
    ┬─┬ ノ( ’ - ‘ノ) {摆好摆好)
    (再掀一次} (╯°Д°)╯︵ ┻━┻
    当然此时已经意识到不是代码的问题,灵机一动一百度果然如此。(:з」∠)
    好了不皮了,解决方法如下:
    这里写图片描述

    这里写图片描述

    解决方法来源于:http://blog.csdn.net/u012453843/article/details/54906905

  • 相关阅读:
    (31)对象的克隆
    (30)批处理文件.bat
    06.v-on的修饰符
    06.v-on参数问题
    06.2修饰符补充
    06.1v-on基础+-.
    03.data数据对象
    02.el挂载点
    02.5v-pre指令
    02.4v-text指令
  • 原文地址:https://www.cnblogs.com/jpfss/p/8303179.html
Copyright © 2011-2022 走看看