图片存到mysql数据库后,控制台查看表就出现无限的乱码,然后未响应....
其他没什么问题,就是不能查看。这是什么情况
其他没什么问题,就是不能查看。这是什么情况
2016-09-13
@Test
public void testIn() throws IOException {
students std = new students();
std.setSname("张三");
std.setGender("男");
std.setBrithday(new Date());
address ar =new address("341000","155323","东方红小学");
std.setAddress(ar);
File file = new File("f:" + File.separator + "mugi.jpg");
InputStream in = new FileInputStream(file);
Blob image = Hibernate.getLobCreator(session).createBlob(in, in.available());
std.setPicture(image);
session.save(std);
in.close();
}举报