mybatis
不会程序的JAVA程序媛
I'm willing to do anything but ordinary
展开
-
MYSQL插入emoji:java.sql.SQLException: Incorrect string value: “\xF0\x9F\x94\xA5” for column
MYSQL插入emoji:java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x94\xA5’ for column背景今天MySQL报了一个错: Incorrect string value: ‘\xF0\x9F\x90\xA2’ for column ‘xxx’ at row 1原因是插入的值是emoji,而我MYSQL一如既往的用了utf8utf-8编码的一个字符最多只能存储3个字节,但一个emoji表情为4个字节,所以utf8不支原创 2020-06-20 21:53:53 · 1708 阅读 · 0 评论 -
mybatis 批量 update时报错 multi-statement not allow解决方案
mybatis 批量 update时报错 multi-statement not allow解决方案原因mysql默认不支持批量更新Druid的multiStatementAllow默认是false解决方案方法一修改application配置spring.datasource.url 后面加上 &allowMultiQueries=true如果配置了druid 注释掉 filters: wall,加上filter:wall:config:multi-statement原创 2020-06-04 01:03:39 · 4424 阅读 · 0 评论