NutzCN Logo
问答 页面请求数据正常,保存时日志乱码 数据库乱码
发布于 1861天前 作者 qq_aa197830 1112 次浏览 复制 上一个帖子 下一个帖子
标签:

数据库时utf8
19-11-17 22:15:14.904 DEBUG [localhost-startStop-1] JDBC Name --> MySQL Connector Java
19-11-17 22:15:14.905 DEBUG [localhost-startStop-1] JDBC URL --> jdbc:mysql://127.0.0.1:3306/nutz
19-11-17 22:15:14.912 DEBUG [localhost-startStop-1] Mysql : character_set_client=utf8
19-11-17 22:15:14.912 DEBUG [localhost-startStop-1] Mysql : character_set_connection=utf8
19-11-17 22:15:14.913 DEBUG [localhost-startStop-1] Mysql : character_set_database=utf8
19-11-17 22:15:14.913 DEBUG [localhost-startStop-1] Mysql : character_set_filesystem=binary
19-11-17 22:15:14.913 DEBUG [localhost-startStop-1] Mysql : character_set_results=
19-11-17 22:15:14.913 DEBUG [localhost-startStop-1] Mysql : character_set_server=utf8
19-11-17 22:15:14.913 DEBUG [localhost-startStop-1] Mysql : character_set_system=utf8
19-11-17 22:15:14.913 DEBUG [localhost-startStop-1] Mysql : character_sets_dir=/usr/share/mysql/charsets/
19-11-17 22:15:14.915 DEBUG [localhost-startStop-1] Mysql : binlog_format=ROW
19-11-17 22:15:14.916 DEBUG [localhost-startStop-1] Mysql : database=nutz
19-11-17 22:15:14.916 DEBUG [localhost-startStop-1] Mysql : user=root@localhost
19-11-17 22:15:14.927 DEBUG [localhost-startStop-1] Database info --> MYSQL:[MySQL - 5.7.28]

tomcat也改过了

部署到实际服务器了
插入数据乱码
INSERT INTO tb_news(title,author,creatTime,goodCount,mianImgPath,synopsis,content,newsType) VALUES(?,?,?,?,?,?,?,?)
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|----|-------|------|---|----------------------------------------------------|---------|-------------------|----|
| 鏂扮殑 | admin | NULL | 0 | upload/images/90bd12b62484459b8dbdd27f6f19a395.jpg | 鏁栧痉钀 | 闃垮痉椋掗鐨br/> | 23 |
For example:> "INSERT INTO tb_news(title,author,creatTime,goodCount,mianImgPath,synopsis,content,newsType) VALUES('鏂扮殑','admin',NULL,0,'upload/images/90bd12b62484459b8dbdd27f6f19a395.jpg','鏁栧痉钀 ','闃垮痉椋掗鐨br/>','23') "

1 回复

打印的wen容器信息呢?

添加回复
请先登陆
回到顶部