随笔分类 - java学习
摘要:/** * 压缩文件成Gzip格式,Linux上可使用 * 压缩文件夹生成后缀名为".gz"的文件并下载 * @param folderPath,要压缩的文件夹的路径 * @param zipFilePath,压缩后文件的路径 * @param zipFileName,压缩后文件的名称 * @throws BizException * */ public static void Co...
阅读全文
摘要:使用场景: 自己模块发生变化后可能引起其他模块变化的部分,需要添加事件通告,通知其他模块。 使用模式: 观察者模式 (以User类为例)写法: 1.创建接口: 2.创建notify处理类 3.进阶-可以扔到jms消息队列中。
阅读全文
摘要:public static void clearDir(File file) { if (file.isDirectory()) { for (File f : file.listFiles()) { clearDir(f); f.delete(); ...
阅读全文
摘要: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...
阅读全文
摘要:windows/mac rename f5/cmd+opt+r
阅读全文
摘要:构建jms http://blog.csdn.net/haoxingfeng/article/details/9167895
阅读全文
摘要:mybatis的mapper不允许重载,因为它需要通过方法名称[不加签名]去查找需要执行的sql 1.批量删除 <delete id="deletePlanLocations" parameterType="list" > delete from plan_location where uuid i
阅读全文
摘要:1.reponse可以得到,但浏览器提示No message body writer has been found for... restapi中没有加下面这个。 @Path("/")@Produces({ MediaType.APPLICATION_JSON })@Consumes({ Media
阅读全文
摘要:1.复制文件 private void fileChannelCopy(File source, File target) throws IOException { FileInputStream fi = null; FileOutputStream fo = null; FileChannel
阅读全文
摘要:jedis 源码地址:https://github.com/xetorthio/jedis
阅读全文
摘要: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%...
阅读全文
摘要:1.背景色调节general->editor->texteditor->选中background RGB: 85 90 2052.java vm参数设置VmAguments中-Drebel.log=true ${jrebel_args}-Xms256m -Xmx512m -XX:MaxNewSize...
阅读全文
摘要:采用joda.time库 gradle,可以简化calendar的 compile "joda-time:joda-time:2.7" 例子:http://blog.csdn.net/zeus_9i/article/details/32318771 时间一直是个非常麻烦的处理 下面就对时间操作的总结
阅读全文
摘要:新版spring官网寻找spring framework方法。http://zhidao.baidu.com/link?url=SozH26NGps060CJdFz9Mf-qiLFPZdN__xdpeef0jzgaG2b7ndYSdhAOPsafXGItth3Bd7kv01PufUqJjyV_TmZ...
阅读全文

浙公网安备 33010602011771号