MyBatis批量更新时提示"You have an error in your SQL syntax"

一直报错提示"You have an error in your SQL syntax"

检查多次确认SQL没写错,查资料后发现是连接字符串问题

如果需要执行批量更新,必须在连接字符串加上allowMultiQueries=true

 

例如:jdbc:mysql://localhost:3306/searchengine?allowMultiQueries=true

 

posted @ 2020-10-17 23:37  Clotho_Lee  阅读(603)  评论(0编辑  收藏  举报