这里配置mybatis报错?是因为什么勒?

来源:3-4 数据访问层搭建-整合MyBatis

火山格格

2019-10-14

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userSerivce’: Unsatisfied dependency expressed through field ‘userMapper’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userMapper’ defined in file [D:\sp\House58\House_biz\target\classes\com\house\mapper\UserMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactory’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 文件提前结束。

写回答

1回答

格鲁

2019-10-23

检查下sql map 文件,语法不符合规范

0
0

Java从单体到微服务打造房产销售平台

单体开发,SpringCloud微服务改造,架构原理剖析,让你在大型项目中独当一面!

711 学习 · 349 问题

查看课程