2013年12月5日

Oracle表生成JavaBean

摘要: package com.batch.tabletojavaimport java.io.DataOutputStream;import java.io.File;import java.io.FileOutputStream;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.ResultSetMetaData;import java.util.ArrayList;import ja 阅读全文

posted @ 2013-12-05 11:31 慢一拍儿 阅读(658) 评论(0) 推荐(0) 编辑

mysql表生成JavaBean

摘要: MySQLToBean.javapackage org.just.util;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.FileWriter;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.sql.Connection;import 阅读全文

posted @ 2013-12-05 11:18 慢一拍儿 阅读(1089) 评论(0) 推荐(0) 编辑

maven工程中pom.xml的错误

摘要: 更新maven工程,出现如下错误信息。Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from http://mvn.hz.netease.com/artifactory/repo was cached in the local repository, resolution will not be reattempted until the update interval of artifactory has elapsed o 阅读全文

posted @ 2013-12-05 08:48 慢一拍儿 阅读(429) 评论(0) 推荐(0) 编辑

2013年5月30日

JAVA 生成带有BOM的UTF8文件

摘要: UTF8文件分为BOM字节顺序编码加BOM头JAVA生成BOM的UTF8文件,需要在文件前面追加3个16进制字节。例:outputStream.wrtie( 0xef );outputStream.wrtie(0xbb);outputStream.wrtie(0xbf);去掉bom头方法: StringfileStr = StringFileToolkit.file2String(new File("D:\\temp\\123.txt"),"UTF-8"); byte[] b = fileStr.getBytes("UTF-8"); 阅读全文

posted @ 2013-05-30 17:25 慢一拍儿 阅读(1130) 评论(0) 推荐(0) 编辑

2013年5月10日

Hibernate的HQL检索时间超长问题

摘要: 昨天执行一本程序时,点击检索按钮后,画面进入定格状态。DEBUG模式观察到,执行一条HQL语句时,停滞不前。关键代码是AbstractBatcher.javagetResultSet(PreparedStatement ps)ResultSet rs = ps.executeQuery();问题关键是 SQL参数中有一项日期类型的字段。select * from A where A.updatedy = : updatedyquery.setDate("updatedy",日期类型);解决方法:select * from A where A.updatedy = : upd 阅读全文

posted @ 2013-05-10 13:42 慢一拍儿 阅读(403) 评论(0) 推荐(0) 编辑

导航