锘??xml version="1.0" encoding="utf-8" standalone="yes"?>97久久国产亚洲精品超碰热,国产成人精品日本亚洲直接,亚洲国产综合人成综合网站00http://m.tkk7.com/daniel007/category/2849.html鐧藉垏闈㈢墖JAVA涔嬭礬zh-cnTue, 06 Nov 2007 16:46:40 GMTTue, 06 Nov 2007 16:46:40 GMT60JSF without ManagedBeanhttp://m.tkk7.com/daniel007/archive/2007/11/05/158337.html鐧藉垏闈㈢墖鐧藉垏闈㈢墖Mon, 05 Nov 2007 11:43:00 GMThttp://m.tkk7.com/daniel007/archive/2007/11/05/158337.htmlhttp://m.tkk7.com/daniel007/comments/158337.htmlhttp://m.tkk7.com/daniel007/archive/2007/11/05/158337.html#Feedback0http://m.tkk7.com/daniel007/comments/commentRss/158337.htmlhttp://m.tkk7.com/daniel007/services/trackbacks/158337.htmlJSF without ManagedBean

鐪嬪埌 Shale 鐨?Spring Integration 鏂囨。鐨勪粙緇嶅師鐞嗭紝鍏朵腑欏哄簭濡備笅錛?/font>

When asked to resolve a variable name, the following algorithm is performed:

1.Does a bean with the specified name already exist in some scope (request, session, application)? If so, return it.

2.Is there a standard JavaServer Faces managed bean definition for this variable name? If so, invoke it in the usual way, and return the bean that was created.

3.Is there configuration information for this variable name in the Spring WebApplicationContext for this application? If so, use it to create and configure an instance, and return that instance to the caller.

4.If there is no managed bean or Spring definition for this variable name, return null instead.

榪欐牱鐨勮瘽錛屽彧瑕?Spring 鍙互鎺у埗 Bean 鐨?Scope 鐨勮瘽錛屽氨鍙互鎶?Managed-Bean 鐨勯厤緗斁鍒?Spring Bean 閲屾潵閰嶇疆錛屼竴鏂歸潰錛屾垜浠彲浠ョ渷鍘諱簡(jiǎn) JSF 鐨?Managed Bean 鐨勯厤緗紝鍙﹀鐨勮瘽錛屾垜浠彲浠ュ JSF 鐨?Backing Bean 浣跨敤 AOP 浠ュ強(qiáng) Spring 鎻愪緵鐨勫緢澶氬姛鑳姐傝繃鍘誨湪 JSF-Spring 涓皾璇曠潃鍘繪帶鍒?Spring Bean 鐨?Scope錛屼絾鏄仛鐨勫茍涓嶅ソ錛岀幇鍦?Spring 2.0 緇欐垜浠彁渚涗簡(jiǎn)榪欐牱鐨勮兘鍔涳紝緇忚繃瀹為獙錛岃瘉鏄庝簡(jiǎn)榪欐牱鏄彲琛岀殑銆?/font>

涓嶈繃濡傛灉浣跨敤 Spring Bean 浠ュ悗錛屼細(xì)閫犳垚浣跨敤 Managed Bean 鐨?JSTL 鏃犳硶浣跨敤錛屽叾瀹?JSTL 鏈韓鐢ㄨ搗鏉ュ氨鏃跺ソ鏃跺潖鐨勶紝鎵浠ュ獎(jiǎng)鍝嶅茍涓嶅お澶т簡(jiǎn)銆?/font>

鏁村悎璧鋒潵姝ラ闈炲父鐨勭畝鍗曪細(xì)

1. 鎶?Spring 2.0 鐨?jar 鏂囦歡鏀懼埌 lib 涓嬮潰錛屽綋鍓嶄嬌鐢ㄧ殑鏄?Spring 2.0 RC3

2. 鍥犱負(fù)浣跨敤鐨勬槸 Servlet 2.4錛屾墍浠ヨ鍦?web.xml 涓姞鍏?br />     <listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>

3. 淇敼 applicationContext.xml

娉ㄩ噴鎴栧垹鎺変互涓嬪唴瀹癸細(xì)

  <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
  "
http://www.springframework.org/dtd/spring-beans.dtd ">

淇敼 <beans> 涓猴細(xì)

  <beans xmlns=" http://www.springframework.org/schema/beans "
       xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance "
       xmlns:aop="
http://www.springframework.org/schema/aop "
       xsi:schemaLocation="
 
http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd
  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd ">

4. 鐒跺悗灝卞彲浠ユ寜鐓ч厤緗?Spring Bean 鐨勬柟寮忔潵閰嶇疆 Managed Bean:

    榪欎釜鏄?Request Scope 涓殑 Bean:
    <bean id="loginBean" class="org.agilejava.icustomer.backingbean.LoginBean"
          scope="request" autowire="byName">
        <aop:scoped-proxy/>
    </bean>

    榪欎釜鏄?Session Scope 涓殑 Bean:
    <bean id="menuBean" class="org.agilejava.framework.commons.menu.MenuBackingBean"
          scope="session" autowire="byName">
        <aop:scoped-proxy/>
    </bean>

铏界劧鐭湡鏉ョ湅錛岄厤緗笂浼?xì)灏戝啓浜?jiǎn)涓浜涳紝鍥犱負(fù) autowire="byName"錛屼絾鏄粠闀胯繙鏉ョ湅錛屾垜浠彲浠ュ埄鐢?Spring 鐨勬洿澶氬姛鑳斤紝姣斿 AOP 鏉ュ寮?Backing Bean 鐨勮兘鍔涳紝鎴戠殑絎竴涓鎯沖氨鏄敤 AOP 鏉ュ鐞?Backing Bean 涓殑寮傚父.good



]]>
主站蜘蛛池模板: 亚洲二区在线视频| 亚洲欧洲日产国码久在线观看| 最近免费中文字幕mv电影| 亚洲小说区图片区另类春色| 亚洲黄色中文字幕| 青青草97国产精品免费观看 | 精品亚洲aⅴ在线观看| 国产青草亚洲香蕉精品久久| 99精品国产成人a∨免费看| 亚洲AV无码成人网站久久精品大| 亚洲欧美日韩一区二区三区| 无码人妻一区二区三区免费n鬼沢| 亚洲国产精品SSS在线观看AV| 久久精品国产亚洲av瑜伽| 又色又污又黄无遮挡的免费视| 日韩亚洲人成在线综合| 亚洲国产专区一区| 中文字幕精品三区无码亚洲| 最好免费观看韩国+日本| 亚洲国产精品久久| 真人做A免费观看| 亚洲美女中文字幕| 成年女人视频网站免费m| 亚洲免费电影网站| 免费观看美女裸体网站| 人人鲁免费播放视频人人香蕉| 久久综合图区亚洲综合图区| 最近中文字幕无免费| 亚洲综合色婷婷在线观看| 亚洲成av人片不卡无码久久| 国产三级在线免费| 亚洲人成在线影院| 女人被免费视频网站| 国产精品免费久久| 亚洲国产精品综合久久网各| 免费观看大片毛片| 成人性生交大片免费看中文| 区久久AAA片69亚洲| 免费观看黄色的网站| 免费无遮挡无遮羞在线看| 久久国产亚洲高清观看|