场景:

mybatis访问本地数据库

原因:

驱动与数据库字符集不匹配

解决:

在url中添加字符集说明

"jdbc:mysql://localhost:3306/mybatis?characterEncoding=utf8"