版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請(qǐng)注明出處,歡迎交流學(xué)習(xí)!
接著上一章節(jié)的內(nèi)容,我們來(lái)分析當(dāng)new一個(gè)FileSystemXmlApplicationContext對(duì)象的時(shí)候,spring到底做了那些事。FileSystemXmlApplicationContext類(lèi)的內(nèi)容主要是定義了若干重載的構(gòu)造方法,核心構(gòu)造方法如下:
/** * Create a new FileSystemXmlApplicationContext with the given parent, * loading the definitions from the given XML files. * * loading all bean definitions and creating all singletons. * Alternatively, call refresh manually after further configuring the context. * */ public FileSystemXmlApplicationContext( String[] configLocations, boolean refresh, @Nullable ApplicationContext parent) throws BeansException { super(parent); setConfigLocations(configLocations); if (refresh) { refresh(); } }
網(wǎng)友評(píng)論