From the Spring JDBC documentation, I know how to insert a blob using JdbcTemplate
final File blobIn = new File(\"spring2004.jpg\");
final InputStream blobIs
Another solution with lambda (which is not required):
jdbcTemplate.update(dbcon -> {
PreparedStatement ps = dbcon.prepareStatement("INSERT INTO ...");
ps.setString(1, yourfieldValue);
ps.setBinaryStream(2, yourInputStream, yourInputStreamSizeAsInt));
return ps;
});
NB. Sorry this does not include KeyGenerator.