在配置一个springmvc+mybatis的项目时,总是有报一个错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
defined in class path resource [mybatis.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/ibatis/session/SqlSession

 

确信在pom文件中添加了mybatis的引用,最后去本地maven库和项目依赖包中查找看,并没有该jar的引用。原因是intellij idea并没有下载该jar包,重新导入引用即可解决。

 

posted on 2016-09-18 17:11  xuxu_dragon  阅读(27372)  评论(0编辑  收藏  举报