-
Mybatis提示Cannot find class [org.mybatis.spring.mapper.MapperScannerConfigurer]10
如题:mybatis提示如下异常,是什么原因?
by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.mybatis.spring.mapper.MapperScannerConfigurer] for bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [applicationContext-mybatis.xml]; nested exception is java.lang.ClassNotFoundException: org.mybatis.spring.mapper.MapperScannerConfigurer
mybatis相关配置:
<!-- scan for mappers and let them be autowired -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.hft.dal.mapper" />
<property name="markerInterface" value="com.hft.dal.SqlMapper" />
</bean>
问题补充:忘记说,这个是mybatis与spring整合2013年7月05日 10:51
4个答案按时间排序按投票排序
-
采纳的答案
解压mybatis-spring1.0.0-RC2.jar,看其中是否有org.mybatis.spring.mapper.MapperScannerConfigurer这个类,若没有换个版本,http://www.jarvana.com/jarvana/archive-details/org/mybatis/mybatis-spring/1.0.2/mybatis-spring-1.0.2.jar
2013年7月05日 11:04