解决方案:在原有连接MySQL数据库的代码基础上添加:?useUnicode=true&characterEncoding=utf-8
原本:
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/test", "root", "123456");
修改之后:
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=utf-8", "root", "123456");
原文:https://www.cnblogs.com/pakind/p/14001481.html