首页 > 名字大全 > 微信名字 正文
【微信名字的符号】[4号] Springboot:微信帐户登录名特殊符号时报告错误的解决方法

时间:2023-03-11 17:14:13 阅读: 评论: 作者:佚名

问题:在第三方用户登录和微信用户登录时,服务器报告了以下错误:SQL exception : incorrect string value : ' \ xf0 \ x9f \ x91 \ x8c ' for

检测到保存微信用户名错误。微信用户名包含特殊图标,报告了错误

解决方案:

1)在数据库中,将相应的字段编码更改为utf8- utf8mb4

2)通过修改a配置文件,将以下配置添加到中,可以解决问题

connectioninitsqls : ' set names utf8 mb4 '

a文件由以下内容组成:

服务器:

端口: 8000

弹簧:

Datasource:

Type:com.alibaba.druid .

Druid:

驱动程序-类-名称: com.my

URL : JDBC : MySQL ://127 . 0 . 0 . 1:3306/测试?allowmultiqueries=trueuseunicode=truecharacterencoding=utf-8 use SSL=false

Username :根

Password: 123456

Initial-size: 10

Max-active: 100

Min-idle: 10

最大值-wait : 60000

connectioninitsqls : ' set names utf8 mb4 '

pool-prepared-statements : true

max-pool-prepared-statement-per-connection-size 3360 20

time-between-eviction-runs-millis : 60000

min-evict able-idle-time-millis : 300000

Test-while-idle: true

Test-on-borrow:假

测试-on-return :假

stat-view-servlet :

Enabled: true

Url-pattern: /druid/*

Filter:

Stat:

Log-slow-sql: true

Slow-slow-sql-millis: 1000

Merge-sql: false

Wall:

Config:

Multi-statement-allow3360 true说明:关注微信公众号[村之一],回复“电子书”,回复[1],回复电子书[抛光设计模式]

这些电子书只用于学习,如果你喜欢,请买正版图书!请支持原创作家!

  • 评论列表

发表评论: