mybatis批量更新或者插入的时候必须在数据库连接上打开allowMultiQueries选项
来源:互联网 发布:知乎阅读精选 编辑:程序博客网 时间:2024/06/16 13:10
如题!
在spring.datasource.url后加上allowMultiQueries=true
如:jdbc:mysql://10.10.20.36:3306/test?allowMultiQueries=true
否则会报错:
- [org.apache.ibatis.session.defaults.DefaultSqlSession@76a2f910]
- org.springframework.jdbc.BadSqlGrammarException:
- ### 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 b_email_msg_remind
- SET send_status = 1, send_email_code='abc@abc.abc'' at line 6
- ### The error may involve com.hhsoft.sectionservice.model.persistence.EmailMapper.updateEmailTasks-Inline
- ### The error occurred while setting parameters
- ### 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 staff
- SET status = 1, send_email_code='abc@abc.abc';<span style="font-family: Helvetica, Tahoma, Arial, sans-serif;">update sta<span style="font-size:10px;">ff SET status = 2,</span> send_email_code='test@qq.com' </span>' at line 6
- ; 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 'update b_email_msg_remind
- SET send_status = 1, send_email_code='abc@abc.abc'' at line 6
0 0
- mybatis批量更新或者插入的时候必须在数据库连接上打开allowMultiQueries选项
- mybatis批量更新 allowMultiQueries
- Mybatis批量插入、更新
- Mybatis 批量插入、批量更新
- mybatis的批量插入与更新
- 基于MyBatis的批量插入更新实现
- Mybatis的批量插入与更新
- Mysql批量更新的一个坑-&allowMultiQueries=true允许批量更新
- spring jdbc 批量插入或者批量更新
- Mybatis批量更新和插入
- mybatis批量更新和插入
- mybatis 批量插入 ,更新总结
- Mybatis批量插入更新数据
- Mybatis+Mysql 批量插入的时候返回主键ID
- mybatis批量插入与批量更新。
- MyBatis中批量插入和批量更新
- mybatis+oracle批量插入,批量更新
- mybatis的批量插入
- Redis 2.8 配置文件说明
- mysql查看所有存储过程
- eclipse 使用maven 构建springboot 读取多个配置文件
- 理解stat命令下3个时间概念---Linux学习笔记(2)
- 线性表的顺序储存
- mybatis批量更新或者插入的时候必须在数据库连接上打开allowMultiQueries选项
- 医疗行业大数据应用案例【智库2861】
- MySQL性能调优与架构设计
- vs 学习
- 用示例来说明如何重载运算符
- 死活登不上localhost manager app? windows系统的来看看,本人用了几小时搞定的。想哭,难受,给后来者提供直道
- 如何进入Linux单用户模式修改root密码
- JNDI
- 初识app之产品需求分析文档设计