随笔分类 -  java学习

摘要:/** * 压缩文件成Gzip格式,Linux上可使用 * 压缩文件夹生成后缀名为".gz"的文件并下载 * @param folderPath,要压缩的文件夹的路径 * @param zipFilePath,压缩后文件的路径 * @param zipFileName,压缩后文件的名称 * @throws BizException * */ public static void Co... 阅读全文
posted @ 2016-03-23 15:16 無限大 阅读(5359) 评论(0) 推荐(0)
摘要:使用场景: 自己模块发生变化后可能引起其他模块变化的部分,需要添加事件通告,通知其他模块。 使用模式: 观察者模式 (以User类为例)写法: 1.创建接口: 2.创建notify处理类 3.进阶-可以扔到jms消息队列中。 阅读全文
posted @ 2016-03-18 16:08 無限大 阅读(938) 评论(0) 推荐(0)
摘要:public static void clearDir(File file) { if (file.isDirectory()) { for (File f : file.listFiles()) { clearDir(f); f.delete(); ... 阅读全文
posted @ 2016-03-16 22:44 無限大 阅读(388) 评论(0) 推荐(0)
摘要:package com.gcy.test.util; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Random; import org.apache.commons.i... 阅读全文
posted @ 2016-03-16 18:42 無限大 阅读(945) 评论(0) 推荐(0)
摘要:windows/mac rename f5/cmd+opt+r 阅读全文
posted @ 2016-03-09 08:10 無限大 阅读(143) 评论(0) 推荐(0)
摘要:构建jms http://blog.csdn.net/haoxingfeng/article/details/9167895 阅读全文
posted @ 2016-02-25 17:23 無限大 阅读(137) 评论(0) 推荐(0)
摘要:mybatis的mapper不允许重载,因为它需要通过方法名称[不加签名]去查找需要执行的sql 1.批量删除 <delete id="deletePlanLocations" parameterType="list" > delete from plan_location where uuid i 阅读全文
posted @ 2016-02-03 10:43 無限大 阅读(267) 评论(0) 推荐(0)
摘要:1.reponse可以得到,但浏览器提示No message body writer has been found for... restapi中没有加下面这个。 @Path("/")@Produces({ MediaType.APPLICATION_JSON })@Consumes({ Media 阅读全文
posted @ 2016-01-29 16:21 無限大 阅读(464) 评论(0) 推荐(0)
摘要:1.复制文件 private void fileChannelCopy(File source, File target) throws IOException { FileInputStream fi = null; FileOutputStream fo = null; FileChannel 阅读全文
posted @ 2016-01-29 11:58 無限大 阅读(558) 评论(0) 推荐(0)
摘要:jedis 源码地址:https://github.com/xetorthio/jedis 阅读全文
posted @ 2016-01-11 16:49 無限大 阅读(367) 评论(0) 推荐(0)
摘要:0.jar包下载地点http://mvnrepository.org/1.序列化反序列化Object代码百度云:http://pan.baidu.com/disk/home#list/path=%2F%E6%88%91%E7%9A%84%E6%96%87%E6%A1%A3%2Fjava%E5%B8%... 阅读全文
posted @ 2016-01-11 14:15 無限大 阅读(230) 评论(0) 推荐(0)
摘要:1.背景色调节general->editor->texteditor->选中background RGB: 85 90 2052.java vm参数设置VmAguments中-Drebel.log=true ${jrebel_args}-Xms256m -Xmx512m -XX:MaxNewSize... 阅读全文
posted @ 2015-11-13 10:27 無限大 阅读(165) 评论(0) 推荐(0)
摘要:采用joda.time库 gradle,可以简化calendar的 compile "joda-time:joda-time:2.7" 例子:http://blog.csdn.net/zeus_9i/article/details/32318771 时间一直是个非常麻烦的处理 下面就对时间操作的总结 阅读全文
posted @ 2015-08-24 09:47 無限大 阅读(463) 评论(0) 推荐(0)
摘要:新版spring官网寻找spring framework方法。http://zhidao.baidu.com/link?url=SozH26NGps060CJdFz9Mf-qiLFPZdN__xdpeef0jzgaG2b7ndYSdhAOPsafXGItth3Bd7kv01PufUqJjyV_TmZ... 阅读全文
posted @ 2015-07-07 18:55 無限大 阅读(410) 评论(0) 推荐(0)