老师好
开始报的异常如下,将xml里foreach方法的dept改为sysDept还是报下面的异常
### Error updating database. Cause: java.sql.SQLException: sql injection violation, multi-statement not allow : UPDATE sys_dept
SET level = ?
WHERE id = ?
改了DruidDataSource配置文件后,不报上面的异常,但是执行批量更新时会出现这个异常,请问要怎么解决?
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE sys_dept
SET dept_level = '0.11'
WHERE id = 3
;
U' at line 5
### The error may involve com.permission.dao.SysDeptMapper.batchUpdateLevel-Inline
### The error occurred while setting parameters
### SQL: UPDATE sys_dept SET dept_level = ? WHERE id = ? ; UPDATE sys_dept SET dept_level = ? WHERE id = ? ; UPDATE sys_dept SET dept_level = ? WHERE id = ?