Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [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: 4; columnNumber: 47; 文档根元素 "mapper" 必须匹配 DOCTYPE 根 "configuration"。
排查错误:
1.查看applicationContext.xml中的mybatis工厂配置:
发现没有网上所说的那些:
<property name="mapperLocations&#