Connection conn = DriverManager.getConnection(“jdbc:mysql://localhost:3306/school?characterEncoding=utf-8”, “root”, “lds199805”);
在数据库名称后面加上参数 ?characterEncoding=utf-8
2024-03-27 20:39:28
Connection conn = DriverManager.getConnection(“jdbc:mysql://localhost:3306/school?characterEncoding=utf-8”, “root”, “lds199805”);
在数据库名称后面加上参数 ?characterEncoding=utf-8