錯誤提示:
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
解決方法:
添加上namespace
<mapper namespace="org.seckill.dao.SuccessKilledDao">