spring整合时的sqlSessionFactory错误!

错误提示:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [B:\maven_workspace\seckill\target\classes\mapper\SuccessKilledDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Mapper's namespace cannot be empty

 

原因:没有在SuccessKilledDao.xml中标注namespace

spring整合时的sqlSessionFactory错误!_第1张图片

 

解决方法:

添加上namespace

 

 

 

 

你可能感兴趣的:(SSM学习笔记)