最近项目用mybatis调用存储过程,在使用的过程中出现了一个错误:The error may involve com.stockcommission.dao.CommissionMapper.param
### The error occurred while setting parameters
### SQL: { call VOLUME_TRANSACTION_MONTH(?,?,?) }
### Cause: java.sql.SQLException: Error
; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Error; nested exception is java.sql.SQLException: Error
调用存储过程mapper.xml配置:
<select id="importCommission" parameterMap="param" statementType="CALLABLE">
{
CALL volume_transaction_month(?,?,?)
}
</select>
网上查了很多的问题解决方法,都无法解决。
纠结了很久,最后同事发现原来是mapper.xml配置的{CALL volume_transaction_month(?,?,?)} 的大括号不能换行。