bean的加載-獲取單例和準備創建bean

1、獲取單例 如果緩存中不存在已經加載的單例bean,就需要重頭開始bean的加載過程,在spring中AbstracBeanFactory的 getSingleton的重載方法實現了bean的加載 1.1、檢查緩存是否已經加載過,spring3.2是直接使用synchronized鎖定需要同步的變量,4.0之後 Object singletonObject = this.singletonObj
相關文章
相關標籤/搜索