当前位置:网站首页>项目中批量update
项目中批量update
2022-07-05 15:26:00 【小蚂蚁hjk】
业务场景是,每条修改的值都不相同
dao

xml:

做到这一步还没有完;此时mysql还不支持批量修改会报错
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 weibo_content
SET
EMOTION = 0.0
W' at line 7
; 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 weibo_content
当时一直以为是自己的语法有误其实不是的,这是因为配置数据源的时候缺少配置

&allowMultiQueries=true这条语句允许一次提交多条sql语句。特别是分号;
完美解决,还是百度发现的
边栏推荐
- 21. [STM32] I don't understand the I2C protocol. Dig deep into the sequence diagram to help you write the underlying driver
- Quick completion guide for manipulator (IX): forward kinematics analysis
- 修改pyunit_time使得其支持‘xx~xx月’的时间文本
- The OBD deployment mode of oceanbase Community Edition is installed locally
- Data communication foundation - routing communication between VLANs
- 基于OpenHarmony的智能金属探测器
- How to introduce devsecops into enterprises?
- Bugku telnet
- Analytic hierarchy process of mathematical modeling (including Matlab code)
- OSI seven layer model
猜你喜欢
随机推荐
Xiao Sha's arithmetic problem solving Report
Bugku easy_ nbt
Noi / 1.5 37: mercenaries
Data communication foundation - routing communication between VLANs
17. [stm32] use only three wires to drive LCD1602 LCD
SQL injection sqllabs (basic challenges) 11-20
Vulnhub-Moneybox
如何将 DevSecOps 引入企业?
Analytic hierarchy process of mathematical modeling (including Matlab code)
Bugku's eyes are not real
lv_font_conv离线转换
2.3 learning content
Database learning - Database Security
把 ”中台“ 的思想迁移到代码中去
19.[STM32]HC_ SR04 ultrasonic ranging_ Timer mode (OLED display)
Bugku's Eval
Data communication foundation smart_ Link_&_ Monitor_ Link
P1451 calculate the number of cells / 1329: [example 8.2] cells
Replknet: it's not that large convolution is bad, but that convolution is not large enough. 31x31 convolution. Let's have a look at | CVPR 2022
Noi / 1.3 01: a+b problem









