数据库时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') "