mybatis異常:Improper inline parameter map format. Should be: #{propName,attr1=val1,attr2=val2}問題分析及解決
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Improper inline parameter map format. Should be: #{propName,attr1=val1,attr2=val2}
<insert id="insertXXOrder" parameterType="yyOrder">
insert into XX_ORDER(
。。。,
MX_NOTIFY_URL
)
values(
。。。,
#{mxNotifyUrl,jdbcType = VARCHAR}
)
分析:
mybatis規範寫法:“#{propName,attr1=val1,attr2=val2}”,“=”號左右兩邊均無空格
因此:
“#{mxNotifyUrl,jdbcType = VARCHAR}”正確寫法:“#{mxNotifyUrl,jdbcType=VARCHAR}”
注:#{mxNotifyUrl,jdbcType = VARCHAR} 前後均無空格