问题描述
运行项目时,报下面的错误
Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\v_hwhao\Code-Java\trunk\tax-foreign-payment\tax-foreign-server\target\classes\mapper\WorkbenchMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 58; columnNumber: 28; The content of elements must consist of well-formed character data or markup.
问题分析
查看 WorkbenchMapper.xml
发现 sql 如下:
<!--获取待办事项列表--><select id="getTodo" resultType="com.foreign.payment.vo.TodoVO" parameterType="com.foreign.payment.data.UserData"><!--税务人员--><if test="param.staffType == 0">select '待新增台账' as name,count(1) as countfrom t_fpts_tax_accountwhere op_type <> 'submit' and account_type = 0 and tax_handle_staffid = #{param.staffId} and is_delete=1union allselect '待审批备案资料' as name,count(1) as countfrom t_fpts_record_doc_taskwhere task_name='税务审核' and tax_handle_staffid = #{param.staffId} and is_delete=1union allselect '待审批付款报税' as name,count(1) as countfrom t_fpts_pay_infowhere handle_status_name='未处理' and tax_handle_staffid = #{param.staffId} and is_delete=1</if><!--业务人员--><if test="param.staffType == 1">select '待上传备案资料' as name,count(1) as countfrom t_fpts_record_doc_taskwhere task_name='资料上传' and upload_staffid =#{param.staffId} and is_delete=1</if></select>
里面的 op_type <> 'submit' 中有特殊字符 <>
修改为 op_type != 'submit' 后解决