在url后面添加参数:url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8
DriverManager.getConnection("jdbc:mysql://localhost:3306/students?useUnicode=true&characterEncoding=utf-8", "root", "");
亲测有效
在url后面添加参数:url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8
DriverManager.getConnection("jdbc:mysql://localhost:3306/students?useUnicode=true&characterEncoding=utf-8", "root", "");
亲测有效