xml文件:
<!--执行存储过程-->
<select id="getIdnexvaluesByMainId" parameterType="string"
resultType="String"
<!-- statementType 声明指向的是什么类型,其中CALLABLE是执行存储过程和函数的-->
statementType="CALLABLE">
CALL ${indexValue}('${mainId}')
</select>
之前看这篇文章https://www.cnblogs.com/xushirong/p/6999568.html,里面是用#{},做传值的,我试了一下总是报错,然后将#{}换为${}
就可以成功调用存储过程了.