实行一条插入语句
输出后发现中文没有被识别,中文乱码
我们可以更改DriverManage,在后边加上设置编码.
DriverManager.getConnection("jdbc:mysql://localhost:3306/数据库?useUnicode=true&characterEncoding=UTF-8","用户名","密码");
实行一条插入语句
输出后发现中文没有被识别,中文乱码
我们可以更改DriverManage,在后边加上设置编码.
DriverManager.getConnection("jdbc:mysql://localhost:3306/数据库?useUnicode=true&characterEncoding=UTF-8","用户名","密码");