Mybatis提示Cannot find class [org.mybatis.spring.mapper.MapperScannerConfigurer]
2017-04-21 15:33
1276 查看
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整合
MyBatis
2013年7月05日 10:51
hft24dq
10
0 0 3
添加评论
关注(0)
4个答案按时间排序按投票排序
00
采纳的答案
解压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.jar2013年7月05日 11:04
zyn010101
2795
2 3 156
3条评论
00
先看你加载的classpath,然后再看里面的jar包有没相应的class,可能是你的jar包版本不一致
2013年7月05日 16:46
jjjssh
320
0 0 6
1条评论
00
刚搭建的框架吧?
如果读不到任何一个配置文件,就会抛出这个异常。
2013年7月05日 15:36
sgq0085
26
0 1 6
2条评论
00
把引入的包贴出来看看,顺便把错误日志贴上来,内容多点,不然这样只会认为是缺少包。
2013年7月05日 13:45
kjmmlzq19851226
260
0 0 18
相关文章推荐
- spring和mybatis整合的关键:org.mybatis.spring.mapper.MapperScannerConfigurer 类作用
- [org.mybatis.spring.mapper.ClassPathMapperScanner]-No MyBatis mapper was found in '[com.xxx.xxx.dao]
- Cannot find class [org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer]
- org.mybatis.spring.mapper.MapperScannerConfigurer$Scanner$1
- org.mybatis.spring.mapper.MapperScannerConfigurer的错误
- org.mybatis.spring.mapper.MapperScannerConfigurer
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring
- org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring
- Spring与Hibernate整合时, Cannot find class [org.apache.commons.dbcp.BasicDataSource]
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring - 大新博客
- Cannot find class [org.apache.commons.dbcp.BasicDataSource]整合spring和hibernate
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring
- spring+mybatis使用MapperScannerConfigurer引起的PropertyPlaceholderConfigurer无效问题处理方法
- Spring与Mybatis整合的MapperScannerConfigurer