摘要:
一、循环HashMap的两种方式 方式1:Iterator> entryKeyIterator = entrySetMap.entrySet().iterator(); while (entryKeyIterator.hasNext()) { Entry e = entryKeyIterator.next(); String value = ... 阅读全文
posted @ 2014-02-26 17:03
King Bruce
阅读(2376)
评论(0)
推荐(0)
摘要:
1 singleton 和 prototypesingleton作用域:当把一个Bean定义设置为singleton作用域是,Spring IoC容器中只会存在一个共享的Bean实例,并且所有对Bean的请求,只要id与该Bean定义相匹配,则只会返回该Bean的同一实例。值得强调的是singleton作用域是Spring中的缺省作用域。prototype作用域:prototype作用域的Bean... 阅读全文
posted @ 2014-02-26 15:14
King Bruce
阅读(176)
评论(0)
推荐(0)
摘要:
核心接口 1 Configuration接口负责配置并启动Hibernate,创建SessionFactory对象 2 SessionFactory接口负责初始化Hibernate。它充当数据存储源的代理,并负责创建Session对象。这里用到了工厂模式。 3 Session接口负责执行被持久化对象的CRUD操作,Session对象是非线程安全的。Hibernate的session不同于J... 阅读全文
posted @ 2014-02-26 10:54
King Bruce
阅读(251)
评论(0)
推荐(0)

浙公网安备 33010602011771号