原文:整合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