From the Spring JDBC documentation, I know how to insert a blob using JdbcTemplate
final File blobIn = new File(\"spring2004.jpg\"); final InputStream blobIs
In case your underlying database is mysql, you can autogenerate your primary key. Then to insert a record into your db, you can use the following syntax for insertion:
INSERT INTO lob_table (a_blob) VALUES (?)