问题描述:Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.
原因是:MySQL驱动和数据库字符集设置不搭配
解决方案:在配置数据源url时候需要拼接上characterEncoding
characterEncoding=utf-8
在后面加上characterEncoding=utf-8就可以解决以上的问题。
补充:有小伙伴在开发过程中可能还出现以下问题
问题描述:The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.
原因:MySQL时默认的是美国时区,这就跟中国时区不一样导致错误的发生,拼接上
serverTimezone=UTC 即可,可看以上图一
OK,欢迎探讨!!!



