[13/07/16 03:25:44:044 CST] localhost-startStop-1  INFO pool.DruidDataSource: {dataSource-1} closed
[13/07/16 03:25:44:044 CST] localhost-startStop-1 ERROR context.ContextLoader: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexController':
Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: 

Could not autowire field: private cn.rcw.index.service.IndexService cn.rcw.index.IndexController.indexService;
nested exception is org.springframework.beans.factory.BeanCreationException:

Error creating bean with name 'indexService': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException: 

Could not autowire field: private cn.rcw.index.dao.WaSysFunctionDao cn.rcw.index.service.IndexService.waSysFunctionDao;
nested exception is org.springframework.beans.factory.

NoSuchBeanDefinitionException: No qualifying bean of type [cn.rcw.index.dao.WaSysFunctionDao] found for dependency:
expected at least 1 bean which qualifies as autowire candidate for this dependency.
Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

(namespace)

0.@component或者@service都可以。

1.检查spring-mybatis.xml文件,确保dao下java文件名和mapper下xml文件名一致

2.检查dao层的接口,是否在mapper里都有实现,id是否都一致

3.检查传入的参数类型parameterType是否一致

4.检查namespace里面类所在的包名是否存在,检查BaseResultMap的type是否存在

5.检查字段是否对应,检查jdbcType是否对应

6.检查是否有“”里面是否有空格,这次就是因为jdbcType=“ varchar”有一个空格,结果出错了。

7.如果检查一次,修改后还不行,请再检查一次,在修改的时候,可能已经导致前面的错误。

myBatis:not bind 问题的更多相关文章

  1. Mybatis标签bind用法

    Mybatis使用bind元素进行模糊查询,不用在乎数据库是mysql还是oracle从而提高可移植性 使用bind元素传递多个参数 public List<Student> findSt ...

  2. [已解决] MyBatis 中bind用法

    JAVA: TC_ENTR_FLOW selectFlowForUpdate(String ENTR_ID); XML: <select id="selectFlowForUpdate ...

  3. Mybatis的bind动态SQL

    bind标签用于在SQL执行的上下文中绑定一个变量,方便在后续中直接使用:下面的例子中将name参数拼接成模糊查询需要的字符串然后和bindName绑定,在后面的使用中可以直接使用bindName变量 ...

  4. mybatis 模糊查询 like的三种方式

    第一种 public void selectBykeyWord(String keyword) { String id = "%" + keyword + "%" ...

  5. mybatis xml 文件中like模糊查询

    1.直接传参法 直接传参法,就是将要查询的关键字keyword,在代码中拼接好要查询的格式,如%keyword%,然后直接作为参数传入mapper.xml的映射文件中. 2.CONCAT()函数 My ...

  6. Mybatis LIKE模糊查询

    1.在代码中拼接好字符串后传入进来 2.使用CONCAT在xml中拼接字符串: <if test="queryParam.keyword != null"> AND b ...

  7. Myatis之bind标签

    myBatis的bind的标签,一般的用法都是 <if test="name!= null and name!= '' "> <bind name="u ...

  8. like模糊查询

    1. ${}获取值,直接连接 name like '%${search_content}%' 2.CONCAT()函数 MySQL的 CONCAT()函数用于将多个字符串连接成一个字符串,是最重要的m ...

  9. Java EE学习笔记(八)

    动态SQL 1.动态SQL中的元素 1).作用:无需手动拼装SQL,MyBatis已提供的对SQL语句动态组装的功能,使得数据库开发效率大大提高! 2).动态SQL是MyBatis的强大特性之一,My ...

  10. 表单模糊查询的三种简单方式(springboot-h2-mybatis)

    前几天运营提到说后台管理系统有几个地方想要模糊查询..   想了下是简单的,就是要注意以前方法的被调用情况,进行增量改动,以免牵一发而动全身.整理一波记录下(本次案例是按名字模糊查询学生信息). 三种 ...

随机推荐

  1. spring 给一个类 生成test

    右击一个类,然后:GoTo==>test ,就可以新建这个类的测试用例了,简单粗暴, 如果想要不污染数据库,就在一个测试用例 的标签@Test 下面在加上@RollBack 这样: @Test ...

  2. DELPHI中MDI子窗口的关闭和打开

    DELPHI中MDI子窗口的关闭 和打开       Delphi中MDI子窗口的关闭方式默认为缩小而不是关闭,所以当你单击子窗口右上角的关闭按钮时会   发觉该子窗口只是最小化,而不是你预期的那样被 ...

  3. Oracle 查询字段不包含多个字符串方法

    开发过程中遇到个需求,用户要提取的数据列中不包含 YF.ZF.JD的字符串, 方法1:select * from table  where  order_no not like '%YF%' and ...

  4. How to RAMDISK on macOS

    diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nomount ram://8388608`

  5. 启动docker容器 防火墙问题报错 ! -i docker0' failed: iptables: No chain/target/match by that name.

    COMMAND_FAILED: '/sbin/iptables -t nat -A DOCKER -p tcp -d 0/0 --dport 8111 -j DNAT --to-destination ...

  6. webpack 打包编译-webkit-box-orient: vertical 后消失

    /* autoprefixer: off */ -webkit-box-orient: vertical; // 参考 https://github.com/postcss/autoprefixer/ ...

  7. Spring Security 学习总结

    Spring Security Spring Security是基于Spring提供声明式安全保护的安全性框架.Spring Security提供了完整的安全性解决方案,能够在Web请求级别和方法调用 ...

  8. Xml的用途

    1.可以作为数据库存储数据--通过XML文件存储数据,可以通过javaScript读取外部的XML文件,然后更新HTML的数据内容 2.XML数据以纯文本格式进行存储,提供了独立于软件和硬件的数据存储 ...

  9. BZOJ4372烁烁的游戏——动态点分治+线段树(点分树套线段树)

    题目描述 背景:烁烁很喜欢爬树,这吓坏了树上的皮皮鼠.题意:给定一颗n个节点的树,边权均为1,初始树上没有皮皮鼠.烁烁他每次会跳到一个节点u,把周围与他距离不超过d的节点各吸引出w只皮皮鼠.皮皮鼠会被 ...

  10. CDQ题目套路总结 [未完成]

    CDQ学习资料 day1cdq分治相关 CDQ的IOI论文 1.优化斜率dp 左边对右边影响维护一个凸包解决 需要知识:①凸包②斜率dp 题目:√ HDU3842 Machine Works   HY ...