springboot启动项目时报错Failed to parse mapping resource:xxx

错误场景:
启动Sringboot时,直接启动不了,报错Failed to parse mapping resource:xxx

错误代码:

<delete id="delete"  resultType="java.lang.Integer">
	delete from table_name where id = #{id}
</delete>

正确代码:

<delete id="delete"  parameterType="java.lang.Integer">
	delete from table_name where id = #{id}
</delete>

区别在于parameterType或resultType的配置

在mybatis的mapper的映射文件的配置中,

只有select同时存在parameterType和resultType、resultMap的配置
而update,insert,delete只存在这三种中的resultType配置

参考文章:https://www.cnblogs.com/dongying/p/4048828.html

你可能感兴趣的:(配置类,Java,springboot)