-
报错内容:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [spring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [C:\Users\huanshao\apache-tomcat-8.5.42\webapps\CS-Service\WEB-INF\classes\com\****\mapping\ ApplicationMapper.xml ]’; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 62; columnNumber: 148; 必须为元素类型 “update” 声明属性 “resultType”。
Caused by: org.xml.sax.SAXParseException; lineNumber: 62; columnNumber: 148; 必须为元素类型 “update” 声明属性 “resultType”。
-
解决办法:
找到出问题的Mapper.xml 文件 中的 update标签,去掉resultType。