之前公司用$,看我没事做就叫我换#号试一下 结果发现一些问题
原来代码中的codition 是一段字符串 如
where t_applyUnit.BAU_CHECKSTATUS = '2'
在xml文件中直接在sql语句后面加上${codition}使用 但是我改成#以后出现问题 似乎自动加了个\似得
### 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 '' where t_applyUnit.BAU_CHECKSTATUS = \'2\''' at line 53
; bad SQL grammar []; nested exception is 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 '' where t_applyUnit.BAU_CHECKSTATUS = \'2\''' at line 53
结果发现好像是输出的语句中前后多了双引号