Spring学习的报错____1.Type interface com.xbf.dao.UserDao is not known to the MapperRegistry.


UserMapper.xml文件没有写

并且在beans.xml(applicationContext.xml)文件中没有配置mybatis的核心配置文件
(注意:属性namespace:写的对应的接口)
(注意:写完后记得在核心配置文件中注册)
配置文件的关联:
UserMapper.xml--->mybatis-config.xml->applicationContext.xml
***天真的我以为可以省略不写。。。。。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



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