Spring中ref local=""與ref bean=""的區別
<reflocal="xx"/>
用"local"屬性指定目標其實是指向同一檔案內對應"id"屬性值為此"local"值的索引
"local"屬性的值必須和目標bean的id屬性相同。如果同一檔案內沒有匹配的元素,xml解析器將提示錯誤。同樣,如果目標在同一XML檔案內,使用"local"變數是最好的選擇(為了儘可能早地知道錯誤)
<refbean="xx"/>
用"bean"屬性指定目標bean是最常規的形式,這允許建立索引到任何同一個容器內的bean(無論是否在同一XML檔案中)或者父級的容器內的bean。"bean"屬性的值可以和目標bean的"id"屬性相同,也可以和目標bean的"name"屬性內的一個值相同
轉載自http://blog.sina.com.cn/s/blog_70aaaa7d0100pfd1.html
相關文章
- ref和out的區別
- ref和out區別
- C#中ref和out的區別C#
- NET|Ref 和out 的區別和聯絡
- oracle index unique scan/index range scan和mysql range/const/ref/eq_ref的區別OracleIndexMySql
- ref
- git pull報“unable to update local ref”解決方案Git
- c# ref out 區別 比較 彙總C#
- vue中的 ref 和 $refsVue
- 認真總結Vue3中ref與reactive區別和isRef與isReactive 型別判斷VueReact型別
- Vue之ref與refs的使用Vue
- perl中my與local的區別
- c#.net中引數修飾符ref,out ,params得區別C#
- React ref的用法React
- webwork 中 external-ref 和interceptor-ref 共同用出現問題Web
- vue --ref用法Vue
- React ref的基本使用React
- 關於React的refReact
- React ref 的前世今生React
- vue3+ts中ref與reactive指定型別實現示例詳解VueReact型別
- examples for oracle ref cursorsOracle
- Vue 標籤中的ref屬性和refsVue
- 全面分析C#方法中的ref和outC#
- Java Bean 與 EJB的區別JavaBean
- vue3 子元件 ref ts型別定義Vue元件型別
- 圖解C#的值型別,引用型別,棧,堆,ref,out圖解C#型別
- React Ref 其實是這樣的React
- 27、EJB與JAVA BEAN的區別?JavaBean
- java bean 與 ejb的區別 (轉)JavaBean
- Vue3中的Ref與Reactive:深入理解響應式程式設計VueReact程式設計
- LOCAL_SHARED_LIBRARIES 與 LOCAL_LDLIBS,LOCAL_LDFLAGS的區別
- Vue.js-11:第十一章 - Vue 中 ref 的使用Vue.js
- C#中ref、out及特殊說明引數的用法C#
- out,ref,params引數傳遞
- spring中的FactoryBean與ObjectFactory的區別SpringBeanObject
- C#中的ref和out的意義和使用方法C#
- vue3 第二天vue響應式原理以及ref和reactive區別VueReact
- Spring中與Bean相關的介面SpringBean