ITeye博客

tony

街头诗人 · 共 33 篇文章

mysql批量导入txt文件数据

1、用java代码造好数据,这里就用1000条 package Utils; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; public class CreateMysqlData { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { FileWriter fw = new FileWriter("D:/Deskt…

2013-05-08 10:55 · 数据库 · 评论(0)

xstream使用小记

前段时间因为项目中要把xml转为java对象,所以接触了xstream。 所有的代码都在附件中,有各种情况的案例。

2013-01-06 11:16 · 工具使用 · 评论(1)

java log 使用

1、定义: private static Log log = LogFactory.getLog(Write2File.class); 2、定义: log4j.properties 3、使用: log.info("eror"); log.debug("debug");

2012-11-23 16:15 · Java · 评论(0)

java string.format()

public static void main(String[] args)throws Exception { String s1 = "汉字"; byte[] buff = s1.getBytes("GBK"); System.out.println(buff.length);//4,汉字在GBK里面刚好是4个字节。 String tmp = new String(buff,"ISO-8859-1");//把4个字节的字节数组按ISO方式转化成字符串 System.out.println(tmp.length());//4,ISO里面一个字节就是一个字符,因此生成的字符串的长度是4 Sy…

2012-11-23 14:20 · Java · 评论(0)

Properties Editor

Eclipse下编辑properties文件的插件,用来写国际化程序非常方便,自动保存为ASCII码。日本人开发的,所以介绍网页全是日文。 http://www.oschina.net/p/properties+editor

2012-10-28 11:06 · 工具使用 · 评论(0)

win7在文件夹中不能通过输入首字母定位文件夹的解决方案

在文件夹中要快速定位到一个文件夹的时候可以直接按首字母就可以快速定位,不知道什么原因,就不可以了。 解决方案: 1、打开文件夹和搜索选项。 2、点击查看标签,然后选择“在视图中选择键入项”,再点击确定即可。

2012-09-18 09:56 · 杂项 · 评论(0)

修改maven repository位置

在setting.xml文件中,<setting>标签下 添加 <localRepository>D:/.m2/asiainfo_repository/repository</localRepository> setting.xml为指定项目的配置文件,非全局配置文件。

2012-09-10 12:48 · 工具使用 · 评论(0)

Maven常用命令

Maven常用命令(完善中。。。) 进入项目目录,与pom.xml同级目录. 清理 mvn clean 编译,跳过测试 mvn install -Dmaven.test.skip=true

2012-09-05 14:35 · Maven · 评论(0)

一些常见svn图标的含义

http://my.oschina.net/coda/blog/33678 迁入 Incoming view - 需要更新的文件。 A file that has content changes committed to the repository that will be applied to the local copy. - 需要迁入的新增文件。 A new file that will be added to the local copy from the repository. Like the outgoing file addition, this may be the re…

2012-09-03 09:46 · 工具使用 · 评论(0)

Eclipse Maven m2eclipse常见问题

错误信息: Eclipse is running in a JRE,but a JDK is required Some Maven plugins may not work when importing projects or updating source folders. 这是因为Eclipse默认运行在JRE上的,而m2eclipse的一些功能要求使用JDK。解决方式是配置Eclipse安装目录的eclipse.ini文件,添加vm配置指向JDK。 例如: --launcher.XXMaxPermSize 256m -vm D:\java\jdk1.6.0_07\bin\javaw.…

2012-08-22 17:16 · Maven · 评论(0)

Eclipse添加SVN、Maven 插件

Eclipse添加SVN、Maven插件 SVN安装地址: http://subclipse.tigris.org/update_1.6.x 选择Subclipse一项即可。 Maven安装地址: http://m2eclipse.sonatype.org/sites/m2e http://m2eclipse.sonatype.org/sites/m2e-extras 以上地址已无效,新地址为:http://subclipse.tigris.org/m2eclipse/1.0 参考: https://github.com/markphip/m2eclipse-subclipse 选择Mave…

2012-08-22 15:17 · Maven · 评论(0)

Spring 图片上传实例

详细请参考如下博客: http://hi.baidu.com/yuwenxinfirst/item/0549534b12b3c60cc116137b http://woshixushigang.iteye.com/blog/1258404 http://www.cnblogs.com/frankliiu-java/articles/1780511.html

2012-08-13 16:06 · Spring · 评论(0)

Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core” 需要导入 jstl-impl-1.2.jar

2012-08-10 10:48 · 页面标签 · 评论(0)

spring JDBCTemplete

http://static.springsource.org/spring/docs/2.5.x/reference/jdbc.html#jdbc-JdbcTemplate Querying (SELECT) A simple query for getting the number of rows in a relation. int rowCount = this.jdbcTemplate.queryForInt("select count(0) from t_accrual"); A simple query using a bind variable. int countOfActo…

2012-08-06 10:14 · Spring · 评论(0)

oracle客户端连接服务器基本配置

详解链接: http://blog.csdn.net/llhhyy1989/article/details/7678467

2012-07-31 15:33 · 数据库 · 评论(0)