System.out.println("Name:" + data);
System.out.println("Desc:" + data.getEmployeeDescription());
Session currentSession = getSessionFactory().getCurrentSession();
Blob blob = Hibernate.getLobCreator(currentSession).createBlob(new byte[0]);
data.setFilename(file.getOriginalFilename());
data.setContent(blob);
data.setContentType(file.getContentType());
data.setId(0);
recipeService.save(data);
return data;
File upload issue:The method createBlob(InputStream) is undefined for the type Hibernate
最新推荐文章于 2022-06-18 15:56:43 发布