解决main No MyBatis mapper was found in 的警告

来源:互联网 发布:淘宝的体验中心在哪里 编辑:程序博客网 时间:2024/06/09 14:48

在集成Spring + mybaits时出现以下警告

org.mybatis.spring.mapper.MapperScannerConfigurer$Scanner.main No MyBatis mapper was found in 'com.***.dao.impl' package. Please check your configuration.


出现以上情况是因为你的配置文件写多了这一段,


<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"><property name="basePackage" value="com.lanyuan.dao.impl" /></bean> 



亲爱吊丝们,把它删除吧!


原因:是

org.mybatis.spring.mapper.MapperScannerConfigurer是扫描仓储类的接口,我不是用接口方式实现管理的.所把那段删除便可!

原创粉丝点击