????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.