【spring bean】 spring中bean之間的引用以及內部bean

在spring中會有以下的幾種狀況:spring 1.在當前容器中,(即在spring.xml這一個配置文件中),一個bean引用了另外一個bean。spa 使用xml   1》  <ref  bean="另外一個bean的id" />class   1.1 構造器容器   1.2 setter配置     2》ref做屬性引用     -----2.1  -構造器注入:<constructor-
相關文章
相關標籤/搜索