File upload issue:The method createBlob(InputStream) is undefined for the type Hibernate

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;

你可能感兴趣的:(java)