???dbutils????????????写娲�??????
???????????? ???????[ 2013/12/16 9:28:38 ] ????????
????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.
???????????????????????婕�???????????????????SPASVO小??(021-61079698-8054)?????????????????????????
??????
??谓??写???????????????????????????????????些??????????????9????贸??????????????????????? ???????????????? Java???????10??????????????MongoDB????????????写??????????????????????????????DIY Hadoop???????????5????????????????????????????????????????????????????????????????Python??????????????SQL Server????????????娲�????????????????小??????????AI??????????谐?????????????猫?11????????????????????????17.5??????????????????????????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????械????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????