上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页

2018年4月30日

摘要: Executors: CachedThreadPool 将为每个任务创建一个线程。 public class CachedThreadPool { public static void main(String[] args) { ExecutorService exec = Executors.ne 阅读全文
posted @ 2018-04-30 17:59 卖肾割阑尾 阅读(134) 评论(0) 推荐(0)

2018年4月27日

摘要: BufferedWriter: private void test(String content,String destPath) throws IOException { BufferedReader br = null; BufferedWriter bufw= null; try { br = 阅读全文
posted @ 2018-04-27 10:14 卖肾割阑尾 阅读(104) 评论(0) 推荐(0)

2018年4月26日

摘要: 转载自:http://www.cnblogs.com/cz123/p/7693064.html 先上一个场景:假如你突然想做饭,但是没有厨具,也没有食材。网上购买厨具比较方便,食材去超市买更放心。 实现分析:在快递员送厨具的期间,我们肯定不会闲着,可以去超市买食材。所以,在主线程里面另起一个子线程去 阅读全文
posted @ 2018-04-26 21:48 卖肾割阑尾 阅读(105) 评论(0) 推荐(0)

2018年4月25日

摘要: Listener可以监听容器中某一执行动作,并根据其要求做出相应的响应。 常用的Web事件的监听接口如下: ServletContextListener:用于监听Web的启动及关闭 ServletContextAttributeListener: 用于监听ServletContext范围内属性的改变 阅读全文
posted @ 2018-04-25 15:23 卖肾割阑尾 阅读(239) 评论(0) 推荐(0)
摘要: Filter 会根据url或者servlet-name拦截请求, app启动是调用init(), 关闭时调用destroy()方法: package com.test; import java.io.IOException; import javax.servlet.Filter;import ja 阅读全文
posted @ 2018-04-25 14:49 卖肾割阑尾 阅读(108) 评论(0) 推荐(0)

2018年4月24日

摘要: eclipse新建maven工程中输入:GroupID是项目组织唯一的标识符,实际对应JAVA的包的结构,是main目录里java的目录结构。ArtifactID就是项目的唯一的标识符,实际对应项目的名称,就是项目根目录的名称。一般GroupID就是填com.leafive.test这样子。参考:h 阅读全文
posted @ 2018-04-24 17:34 卖肾割阑尾 阅读(76) 评论(0) 推荐(0)
摘要: compile ('com.donghua.test-common:6.17.0') { changing = true //表示从库中拉最新代码,如果有人提交当前模块的jar而名字没变,不然会从缓存中拉 exclude group: 'javax.servlet' exclude group: ' 阅读全文
posted @ 2018-04-24 15:47 卖肾割阑尾 阅读(341) 评论(0) 推荐(0)

2018年4月13日

摘要: 事件源触发,被pulish到监听者,实现监听功能,本文用反射的方法进行publish. 事件源 public class MyEvent extends EventObject{ private static final long serialVersionUID = 1L; private Str 阅读全文
posted @ 2018-04-13 17:09 卖肾割阑尾 阅读(166) 评论(0) 推荐(0)
摘要: package com.test.lisener; import java.util.ArrayList;import java.util.List; //An interface to be implemented by everyone interested in "Hello" eventsi 阅读全文
posted @ 2018-04-13 15:54 卖肾割阑尾 阅读(73) 评论(0) 推荐(0)
摘要: 注解可参考: https://blog.csdn.net/u010648555/article/details/76299467 http://www.voidcn.com/article/p-qpogajgy-xz.html http://www.voidcn.com/article/p-xthv 阅读全文
posted @ 2018-04-13 15:33 卖肾割阑尾 阅读(86) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页

导航