Could not get JDBC Connection; nested exception is java.sql.SQLException: Unknown initial character

使用spring JDBC报错Could not get JDBC Connection; nested exception is java.sql.SQLException: Unknown initial character set index ‘255’ received from server. Initial client character set can be forced via the ‘characterEncoding’ property.
问题解决方法 数据库编码与之不匹配
在url中添加?useUnicode=true&characterEncoding=utf8 即可解决
在这里插入图片描述

你可能感兴趣的:(java)