2013年7月18日

摘要: 标记一下比较重要的类:ExecutorService:真正的线程池接口。ScheduledExecutorService能和Timer/TimerTask类似,解决那些需要任务重复执行的问题。ThreadPoolExecutorExecutorService的默认实现。ScheduledThreadPoolExecutor继承ThreadPoolExecutor的ScheduledExecutorService接口实现,周期性任务调度的类实现。要配置一个线程池是比较复杂的,尤其是对于线程池的原理不是很清楚的情况下,很有可能配置的线程池不是较优的,因此在Executors类里面提供了一些静态工厂 阅读全文
posted @ 2013-07-18 14:44 世界之大追梦者 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 加载配置文件的方式Spring 中加载XML配置文件的方式,好像有3种, XML是最常见的Spring 应用系统配置源。Spring中的几种容器都支持使用XML装配bean,包括: XMLBeanFactory , ClassPathXMLApplicationContext , FileSystemXMLApplicationContext , XMLWebApplicationContext 一:XMLBeanFactory 引用资源 Resource resource = new ClassPathResource("appcontext.XML"); BeanFac 阅读全文
posted @ 2013-07-18 10:09 世界之大追梦者 阅读(158) 评论(0) 推荐(0) 编辑

导航