????dbutils?????????????CRUD?????????????dbutils????????胁??????????????????????JDBC????????????????????(?????????)?????????????????(???)???????????校??????写????????小?
?????????2??????????

@Test
public void add() throws  Exception{
String sql = "insert into resume(resume) values(?)";
String path = UserDaoImpl.class.getClassLoader().getResource("resume.txt").getPath();
File file = new File(path);
FileReader read = new FileReader(file);
Object param = read; //<span style="color:#cc33cc;">??????????????</span>
QueryRunner qr = new QueryRunner(JdbcC3p0Utils.getDataSource());
qr.update(sql?? param);
}
???????resume????????卸?????????clob????????????????????????????clob?????Clob??????????????????????????SerialClob??????????????????
SerialClob(char[])??SerialClob(Clob)??????????写?????锟�?
@Test
public void addClobTest() throws  Exception{
String sql = "insert into resume(resume) values(?)";
String path = UserDaoImpl.class.getClassLoader().getResource("resume.txt").getPath();
File file = new File(path);
FileReader read = new FileReader(file);
char[] buf = new char[(int) file.length()];
read.read(buf);
Object param = new SerialClob(buf);
QueryRunner qr = new QueryRunner(JdbcC3p0Utils.getDataSource());
qr.update(sql?? param);
}
????//??????????:
mysql> select * from resume;
+----+---------------------------------------------------------------+
| id | resume                                                        |
+----+---------------------------------------------------------------+
|  1 | aaaaaaaaaaaaaaaaaddddddddddddddddddd
xsdssssssssssssssssssss |
+----+---------------------------------------------------------------+
????写??????????
?????????????????????dbutils???????????????????????校?????????????????????????????????????????????????????????????貌?????dbutils.