嗨,以下是我的 customMapping 文件。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.c.DeploymentMapper">
<typeAlias type="org.bpmn.core.mgt.model.DeploymentMetaDataModel" alias="DeploymentMetaDataModel"/>
<resultMap type="org.bpmn.core.mgt.model.DeploymentMetaDataModel" id="selectMetaDataMap">
<id column="ID_" property="id"/>
<result column="NAME_" property="packageName"/>
<result column="TENANT_ID_" property="tenantID"/>
<result column="CHECK_SUM_" property="checkSum"/>
</resultMap>
<!-- Default execution as PREPARED statements -->
<select id="selectMetaData" resultMap="selectMetaDataMap">
select * from BPS_BPMN_DEPLOYMENT_METADATA WHERE TENANT_ID_ = #{tenantID} AND NAME_ = #{name}
</select>
</mapper>
阅读此文件时,我得到了这个例外。
org.camunda.bpm.engine.ProcessEngineException: Error while building ibatis SqlSessionFactory: Error parsing SQL Mapper Configuration.
Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.
Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 47; Document root element "mapper", must match DOCTYPE root "null".
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:887)
这是我的 mappings.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="lazyLoadingEnabled" value="false" />
</settings>
<mappers>
<mapper resource="DeploymentMapper.xml" />
</mappers>
</configuration>
关于我的映射文件有什么问题的任何想法?