锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产亚洲综合性久久久影院,亚洲综合影视,动漫成人在线观看http://www.aygfsteel.com/GavinMiao/category/49316.html鎴戝湪浠版湜錛宩ava涔嬩笂zh-cnFri, 06 Apr 2012 12:41:40 GMTFri, 06 Apr 2012 12:41:40 GMT60ssh闆嗘垚涓璼ession鐨勭鐞嗭紙杞澆錛?/title><link>http://www.aygfsteel.com/GavinMiao/archive/2012/03/23/372550.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Fri, 23 Mar 2012 07:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/GavinMiao/archive/2012/03/23/372550.html</guid><wfw:comment>http://www.aygfsteel.com/GavinMiao/comments/372550.html</wfw:comment><comments>http://www.aygfsteel.com/GavinMiao/archive/2012/03/23/372550.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/GavinMiao/comments/commentRss/372550.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/GavinMiao/services/trackbacks/372550.html</trackback:ping><description><![CDATA[     鎽樿: 鏂囩珷鏉ユ簮錛歨ttp://www.iteye.com/topic/7339711錛庨氳繃getSession()鏂規硶鑾峰緱session榪涜鎿嶄綔 Java浠g爜  public class Test  extends HibernateDaoSupport{      ...  <a href='http://www.aygfsteel.com/GavinMiao/archive/2012/03/23/372550.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/GavinMiao/aggbug/372550.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GavinMiao/" target="_blank">GavinMiao</a> 2012-03-23 15:33 <a href="http://www.aygfsteel.com/GavinMiao/archive/2012/03/23/372550.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>spring2.0瀛︿範絎旇http://www.aygfsteel.com/GavinMiao/archive/2012/03/22/372484.htmlGavinMiaoGavinMiaoThu, 22 Mar 2012 09:52:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2012/03/22/372484.htmlhttp://www.aygfsteel.com/GavinMiao/comments/372484.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2012/03/22/372484.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/372484.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/372484.html<bean>
    <property name="">
        <ref bean="bean鐨刵ame鎴杋d"/>
    </property>
    <property name="">
        <!--鍐呴儴bean-->
        <bean></bean>
    </property>
    <property name="">
        <ref local="鍙兘鏄悓涓鏂囦歡鐨刡ean鐨刬d"/>
    </property>
    <!--idref鍏冪礌鐢ㄦ潵寮曠敤鍏跺畠bean鐨刬d錛宻pring浼氶獙璇乮d鏄惁瀛樺湪-->
    <property name="">
        <idref bean=""/>
    </property>
    <!--idref鍏冪礌鐨刲ocal灞炴х敤鏉ュ紩鐢ㄥ叾瀹僢ean鐨刬d錛宻pring浼氶獙璇乮d鏄惁瀛樺湪錛屽茍涓旈獙璇佷笌寮曠敤鐨刡ean鏄惁鍦ㄥ悓涓鏂囦歡-->
    <property name="">
        <idref local=""/>
    </property>
    <property name="">
        <value></value>
    </property>
    <property name="" ref=""/>
    <property name="" value=""/>
    <property name="">
        <null/>
    </property>
    <property name="">
            <props>
                <prop key=""></prop>
                 <prop key=""></prop>
            </props>
    </property>

    <property name="">
        <list>
            <value></value>
            <ref bean=""/>    
        </list>
    </property>

    <property name="">
        <set>
            <value></value>
            <ref bean=""/>    
        </set>
    </property>

    <property name="">
        <map>
            <entry>
                <key>
                    <value></value>
                </key>
                <value></value>
            </entry>
            <entry key="" value=""/><!--鎺ㄨ崘-->
            <entry key="">
                <value>
                </value>
            </entry>
            <entry key-ref="" value-ref=""/>
            <entry>
                <key>
                    <value></value>
                </key>
                <ref bean=""/>
            </entry>
        </map>
    </property>
</bean>
浜屻乧ontructor DI錛?br />
<bean>
    <constructor-arg>
        <ref bean=""/>
    </constructor-arg>
    <constructor-arg ref="bean鐨刵ame鎴杋d"/>
    <constructor-arg value=""/>
    <constructor-arg type="" value=""/>
    <constructor-arg index="" value=""/><!--棣栭?->
</bean>


GavinMiao 2012-03-22 17:52 鍙戣〃璇勮
]]>
spring1.1瀛︿範絎旇http://www.aygfsteel.com/GavinMiao/archive/2012/03/21/372386.htmlGavinMiaoGavinMiaoWed, 21 Mar 2012 09:34:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2012/03/21/372386.htmlhttp://www.aygfsteel.com/GavinMiao/comments/372386.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2012/03/21/372386.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/372386.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/372386.html闃呰鍏ㄦ枃

GavinMiao 2012-03-21 17:34 鍙戣〃璇勮
]]>
spring2.5鏂扮壒鎬?/title><link>http://www.aygfsteel.com/GavinMiao/archive/2012/03/20/372300.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Tue, 20 Mar 2012 09:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/GavinMiao/archive/2012/03/20/372300.html</guid><wfw:comment>http://www.aygfsteel.com/GavinMiao/comments/372300.html</wfw:comment><comments>http://www.aygfsteel.com/GavinMiao/archive/2012/03/20/372300.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/GavinMiao/comments/commentRss/372300.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/GavinMiao/services/trackbacks/372300.html</trackback:ping><description><![CDATA[1.spring2.5瀹屽叏鏀寔java1.6<br />2.瀹屽叏鏀寔Java EE 5<br />3.spring2.5鎻愪緵浜嗗畬鏁寸殑annotation闆嗗悎錛欯Autowired錛屼互鍙婂JSR-250娉ㄨВ@Resource錛孈PostConstruct錛孈PreDestroy<br />4.鍦╟lasspath涓嚜鍔ㄦ悳绱㈠甫鏈塧nnotation鐨勭粍浠躲?br />5.spring2.5鍔犲叆浜嗗bean錛?..錛塸ointcut鍏冪礌鐨勬敮鎸侊紝鍦╯pring瀹氫箟鐨刡ean鍛藉悕涓鎸囧畾鐨勫懡鍚嶈繘琛屽尮閰?br />6.鍦╯pring搴旂敤涓嬌鐢ˋspectJ鍔犺澆鏃剁粐鍏ontext錛歭oad-time-weaver<br />7.澧炲姞錛岄氳繃context錛歭oad-time-weaver鍜宼x錛歛nnotation-driven mode="aspectj"鑱斿悎浣跨敤鐨勬敞瑙i┍鍔ㄧ殑浜嬪姟綆$悊<br />8.瀵笿PA錛屽崌綰у埌鏀寔Open JPA1.0<br />9.2.5鏄捐憲鐨勬墿鍏呬簡SimpleJdbcTemplate鐨勫姛鑳斤紝寮曞叆浜哠impleJdbcCall鍜孲impleJdbcInsert鎿嶄綔瀵硅薄<br />10錛寃eb灞傦紝澧炲姞浜嗗熀浜庢敞瑙g殑Controller<br />11.spring2.5寮曞叆浜嗗熀浜巃nnotation鐨凪VC緙栫▼妯″瀷錛屼嬌鐢ˊRequestMapping銆丂RequestParam銆丂ModelAttribute絳夌瓑<br />12.澧炲姞瀵箃iles2鐨勬敮鎸?br />13.寮曞叆浜唖ping TestContext Framework錛屽畠鎻愪緵浜嗘敞瑙i┍鍔ㄧ殑鍗曞厓鍜岄泦鎴愭祴璇曟敮鎸?img src ="http://www.aygfsteel.com/GavinMiao/aggbug/372300.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GavinMiao/" target="_blank">GavinMiao</a> 2012-03-20 17:57 <a href="http://www.aygfsteel.com/GavinMiao/archive/2012/03/20/372300.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>spring2.0鏂扮壒鎬?/title><link>http://www.aygfsteel.com/GavinMiao/archive/2012/03/20/372297.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Tue, 20 Mar 2012 09:37:00 GMT</pubDate><guid>http://www.aygfsteel.com/GavinMiao/archive/2012/03/20/372297.html</guid><wfw:comment>http://www.aygfsteel.com/GavinMiao/comments/372297.html</wfw:comment><comments>http://www.aygfsteel.com/GavinMiao/archive/2012/03/20/372297.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/GavinMiao/comments/commentRss/372297.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/GavinMiao/services/trackbacks/372297.html</trackback:ping><description><![CDATA[<div>1.<div style="display: inline-block; "></div><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; ">寮曞叆request scope銆乻ession scope鍜屽彲鑷畾涔夌殑scope錛坔ooks錛?br />2.<div style="display: inline-block; "></div></span><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; ">寮曞叆浜哫ML <div style="display: inline-block; "></div></span><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; ">Schema鐨刵amespace,<div style="display: inline-block; "></div></span><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; ">綆鍖栦簡閰嶇疆錛屽寘鎷簡瀵筨ean灞炴х殑鍚勭綆鍖栵紝AOP閰嶇疆鐨勭畝鍖栵紝浜嬪姟閰嶇疆鐨勭畝鍖栵紝JNDI閰嶇疆鐨勭畝鍖栫瓑鏂歸潰<br />3.spring2.0闆嗘垚浜咥spectJ鍒囧叆鐐癸紙pointcut錛夎璦鍜孈AspectJ鍒囬潰錛坅spect錛夊0鏄庣被鍨?br />4.鏀寔@AspectJ娉ㄨВ瀹氫箟鍒囬潰<br />5.鎻愪緵浜咼PA鐨勬娊璞″眰<br />6.瀵逛簬JMS錛宻pring2.0鎻愪緵寮傛鎺ュ彈娑堟伅<br />7.瀵逛簬jdbc錛屽鍔犱簡NamedParameterJdbcTemplate銆丼impleJdbcTemplate<br />8.瀵筳ava1.5鐨勬敮鎸侊紝緇撳悎AspectJ浣跨敤@Transactional銆佷嬌鐢ˋspectJ鏉ヤ負domain object榪涜渚濊禆娉ㄥ叆銆丂AspectJ銆丂Required銆丼impleJdbcTemplate<br /><br /></span></div><img src ="http://www.aygfsteel.com/GavinMiao/aggbug/372297.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GavinMiao/" target="_blank">GavinMiao</a> 2012-03-20 17:37 <a href="http://www.aygfsteel.com/GavinMiao/archive/2012/03/20/372297.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>spring2.0鏁村悎struts1(杞澆)http://www.aygfsteel.com/GavinMiao/archive/2012/03/16/372014.htmlGavinMiaoGavinMiaoFri, 16 Mar 2012 02:14:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2012/03/16/372014.htmlhttp://www.aygfsteel.com/GavinMiao/comments/372014.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2012/03/16/372014.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/372014.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/372014.html闃呰鍏ㄦ枃

GavinMiao 2012-03-16 10:14 鍙戣〃璇勮
]]>
spring鏁村悎hibernate錛坅nnotation鏂瑰紡錛?/title><link>http://www.aygfsteel.com/GavinMiao/archive/2012/03/15/371914.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Thu, 15 Mar 2012 03:08:00 GMT</pubDate><guid>http://www.aygfsteel.com/GavinMiao/archive/2012/03/15/371914.html</guid><wfw:comment>http://www.aygfsteel.com/GavinMiao/comments/371914.html</wfw:comment><comments>http://www.aygfsteel.com/GavinMiao/archive/2012/03/15/371914.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/GavinMiao/comments/commentRss/371914.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/GavinMiao/services/trackbacks/371914.html</trackback:ping><description><![CDATA[    鍙湁娉ㄥ唽鐢ㄦ埛鐧誨綍鍚庢墠鑳介槄璇昏鏂囥?a href='http://www.aygfsteel.com/GavinMiao/archive/2012/03/15/371914.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/GavinMiao/aggbug/371914.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GavinMiao/" target="_blank">GavinMiao</a> 2012-03-15 11:08 <a href="http://www.aygfsteel.com/GavinMiao/archive/2012/03/15/371914.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>spring鏁村悎hibernatehttp://www.aygfsteel.com/GavinMiao/archive/2012/03/14/371878.htmlGavinMiaoGavinMiaoWed, 14 Mar 2012 09:42:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2012/03/14/371878.htmlhttp://www.aygfsteel.com/GavinMiao/comments/371878.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2012/03/14/371878.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/371878.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/371878.html闃呰鍏ㄦ枃

GavinMiao 2012-03-14 17:42 鍙戣〃璇勮
]]>
寮傚父縐瘡錛?nested exception is org.hibernate.SessionException: Session is closed瑙e喅鏂規http://www.aygfsteel.com/GavinMiao/archive/2011/10/21/361707.htmlGavinMiaoGavinMiaoFri, 21 Oct 2011 03:20:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2011/10/21/361707.htmlhttp://www.aygfsteel.com/GavinMiao/comments/361707.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2011/10/21/361707.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/361707.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/361707.htmlhttp://blog.csdn.net/xiangsuixinsheng/article/details/6451752
榪欑鏂瑰紡鑾峰緱鐨剆ession鍦ㄦ柟娉曟墽琛岀粨鏉熶箣鍚庝笉浼氳嚜鍔ㄥ叧闂繛鎺?/span>,涔熷氨鏄鎴戜滑蹇呴』閫氳繃session.close()鎴栬卹eleaseSession(session)鏉ユ墜鍔ㄨ繘琛屽叧闂?鍚﹀垯浼氶犳垚鍐呭瓨娉勯湶鎴栬呰繛鎺ヨ楀敖絳夐棶棰樸傛墜鍔ㄥ叧闂? 

涔嬪悗錛屽鏋滃鏌愭柟娉曡繘琛屼簨鍔℃帶鍒訛紝閭d箞spring妗嗘灦浼氳嚜鍔ㄤ負鎴戜滑鍏抽棴session錛屾縐嶆儏鍐?session.close())涓嬪啀鎵ц涓婅堪浠g爜錛屼細鎶涘嚭濡備笅寮傚父:org.springframework.orm.hibernate3.HibernateSystemException:
 Session is closed; nested exception is org.hibernate.SessionException: Session is closed 
鎻愮ずsession宸茬粡鍏抽棴銆備絾鏄鏋滃湪浠g爜涓氳繃releaseSession(session)鐨勬柟娉曟潵鍏抽棴session錛屽垯涓嶄細鎶涘嚭寮傚父銆?/strong>


GavinMiao 2011-10-21 11:20 鍙戣〃璇勮
]]>
spring浜嬪姟--娉ㄨВ--鐗囨http://www.aygfsteel.com/GavinMiao/archive/2011/10/21/361687.htmlGavinMiaoGavinMiaoThu, 20 Oct 2011 17:07:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2011/10/21/361687.htmlhttp://www.aygfsteel.com/GavinMiao/comments/361687.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2011/10/21/361687.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/361687.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/361687.html闃呰鍏ㄦ枃

GavinMiao 2011-10-21 01:07 鍙戣〃璇勮
]]>
spring2.5reference絎旇http://www.aygfsteel.com/GavinMiao/archive/2011/08/31/357634.htmlGavinMiaoGavinMiaoWed, 31 Aug 2011 05:26:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2011/08/31/357634.htmlhttp://www.aygfsteel.com/GavinMiao/comments/357634.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2011/08/31/357634.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/357634.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/357634.html闃呰鍏ㄦ枃

GavinMiao 2011-08-31 13:26 鍙戣〃璇勮
]]>
spring娉ㄨВhttp://www.aygfsteel.com/GavinMiao/archive/2011/08/30/357569.htmlGavinMiaoGavinMiaoTue, 30 Aug 2011 06:44:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2011/08/30/357569.htmlhttp://www.aygfsteel.com/GavinMiao/comments/357569.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2011/08/30/357569.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/357569.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/357569.html闃呰鍏ㄦ枃

GavinMiao 2011-08-30 14:44 鍙戣〃璇勮
]]>
spring闈㈣瘯棰?/title><link>http://www.aygfsteel.com/GavinMiao/archive/2011/08/29/357463.html</link><dc:creator>GavinMiao</dc:creator><author>GavinMiao</author><pubDate>Sun, 28 Aug 2011 16:38:00 GMT</pubDate><guid>http://www.aygfsteel.com/GavinMiao/archive/2011/08/29/357463.html</guid><wfw:comment>http://www.aygfsteel.com/GavinMiao/comments/357463.html</wfw:comment><comments>http://www.aygfsteel.com/GavinMiao/archive/2011/08/29/357463.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/GavinMiao/comments/commentRss/357463.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/GavinMiao/services/trackbacks/357463.html</trackback:ping><description><![CDATA[    鍙湁娉ㄥ唽鐢ㄦ埛鐧誨綍鍚庢墠鑳介槄璇昏鏂囥?a href='http://www.aygfsteel.com/GavinMiao/archive/2011/08/29/357463.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/GavinMiao/aggbug/357463.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GavinMiao/" target="_blank">GavinMiao</a> 2011-08-29 00:38 <a href="http://www.aygfsteel.com/GavinMiao/archive/2011/08/29/357463.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>spring鐨剆ingleton鍜宲rototypehttp://www.aygfsteel.com/GavinMiao/archive/2011/08/10/356257.htmlGavinMiaoGavinMiaoWed, 10 Aug 2011 09:31:00 GMThttp://www.aygfsteel.com/GavinMiao/archive/2011/08/10/356257.htmlhttp://www.aygfsteel.com/GavinMiao/comments/356257.htmlhttp://www.aygfsteel.com/GavinMiao/archive/2011/08/10/356257.html#Feedback0http://www.aygfsteel.com/GavinMiao/comments/commentRss/356257.htmlhttp://www.aygfsteel.com/GavinMiao/services/trackbacks/356257.html灝辮繖闂鍙傝冪綉涓婅祫鏂欙紝鎬葷粨涓涓嬶紝浠ュ鏃ュ悗鐢ㄣ?br />
鍘熸枃鍦板潃錛?span class="Apple-style-span" style="font-weight: normal; ">浣滆咃細macg

  • singleton---鍗曚緥妯″紡


鍗曚緥妯″紡,鍦╯pring 涓叾瀹炴槸scope(浣滅敤鑼冨洿)鍙傛暟鐨勭己鐪佽瀹氬?br />姣忎釜bean瀹氫箟鍙敓鎴愪竴涓璞″疄渚?姣忔getBean璇鋒眰鑾峰緱鐨勯兘鏄瀹炰緥

  • 鍗曚緥妯″紡鍒嗕負楗挎眽妯″紡鍜屾噿姹夋ā寮?/li>
楗挎眽妯″紡
spring singleton鐨勭己鐪佹槸楗挎眽妯″紡:鍚姩瀹瑰櫒鏃?鍗沖疄渚嬪寲瀹瑰櫒鏃?,涓烘墍鏈塻pring閰嶇疆鏂囦歡涓畾涔夌殑bean閮界敓鎴愪竴涓疄渚?br />
鎳掓眽妯″紡
鍦ㄧ涓涓姹傛椂鎵嶇敓鎴愪竴涓疄渚?浠ュ悗鐨勮姹傞兘璋冪敤榪欎釜瀹炰緥
spring singleton璁劇疆涓烘噿姹夋ā寮?

<beans
default-lazy-init="true">


  • 鍙︿竴縐嶅拰singleton瀵瑰簲鐨剆cope鍊?--prototype澶氬疄渚嬫ā寮?/li>
璋冪敤getBean鏃?灝眓ew涓涓柊瀹炰緥

  • singleton鍜宲rototype鐨勬瘮杈?/li>
singleton
xml閰嶇疆鏂囦歡:
<bean id="dvdTypeDAO" class="com.machome.hibernate.impl.DvdTypeDAOImpl" />   
嫻嬭瘯浠g爜:
        ctx = new ClassPathXmlApplicationContext("spring-hibernate-mysql.xml");
        DvdTypeDAO tDao1 = (DvdTypeDAO)ctx.getBean("dvdTypeDAO");
        DvdTypeDAO tDao2 = (DvdTypeDAO)ctx.getBean("dvdTypeDAO");
榪愯:        
true
com.machome.hibernate.impl.DvdTypeDAOImpl@15b0333
com.machome.hibernate.impl.DvdTypeDAOImpl@15b0333

璇存槑鍓嶅悗涓ゆgetBean()鑾峰緱鐨勬槸鍚屼竴瀹炰緥,璇存槑spring緙虹渷鏄崟渚?/span>

prototype
<bean id="dvdTypeDAO" class="com.machome.hibernate.impl.DvdTypeDAOImpl" scope="prototype" />
 
鎵ц鍚屾牱鐨勬祴璇曚唬鐮?br />
榪愯:
false
com.machome.hibernate.impl.DvdTypeDAOImpl@afae4a
com.machome.hibernate.impl.DvdTypeDAOImpl@1db9852
璇存槑scope="prototype"鍚?姣忔getBean()鐨勯兘鏄笉鍚岀殑鏂板疄渚?br />





GavinMiao 2011-08-10 17:31 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 嘉鱼县| 新郑市| 建平县| 米泉市| 中西区| 仲巴县| 安仁县| 隆回县| 肃北| 云和县| 商河县| 拉萨市| 怀来县| 天门市| 舞钢市| 镇远县| 富平县| 芷江| 女性| 额济纳旗| 蓬安县| 赤水市| 从江县| 永安市| 化德县| 达尔| 达州市| 阳东县| 长兴县| 清苑县| 泸西县| 拜泉县| 万山特区| 德化县| 永顺县| 土默特右旗| 铜鼓县| 开江县| 阿克苏市| 双桥区| 白朗县|