原文:整合spring与mybatis(Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services' de)

今天在整合spring和mybatis两个框架时,发现了一个很奇怪的问题: dao层中的接口名会影响在spring中注入时的属性的引用类型的名字. 举个例子: 假如dao层中的接口名为IStudentDao,映射文件名为IStudentDao.xml ,此时在beans.xml spring的配置文件 文件中为service注入dao时,没有影响,程序可以正常跑起来. 各个截图如下: 图一.工程目 ...

2018-02-12 10:24 0 42939 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM