public?interface?BeanFactory?{ ???String?FACTORY_BEAN_PREFIX?=?"&"; ???/** ????*? ????*/ ???Object?getBean(String?name)?throws?BeansException; ???/** ????*? ????*/ ???<T>?T?getBean(String?name,?@Nullable?Class<T>?requiredType)?throws?BeansException; ???/** ????*? ????*/ ???Object?getBean(String?name,?Object...?args)?throws?BeansException; ???/** ????*? ????*/ ???<T>?T?getBean(Class<T>?requiredType)?throws?BeansException; ???/** ????*? ????*/ ???<T>?T?getBean(Class<T>?requiredType,?Object...?args)?throws?BeansException; ???/** ????*? ????*/ ???boolean?containsBean(String?name); ???/** ????*? ????*/ ???boolean?isSingleton(String?name)?throws?NoSuchBeanDefinitionException; ???/** ????*? ????*/ ???boolean?isPrototype(String?name)?throws?NoSuchBeanDefinitionException; ???/** ????*? ????*/ ???boolean?isTypeMatch(String?name,?ResolvableType?typeToMatch)?throws?NoSuchBeanDefinitionException; ???/** ????*? ????*/ ???boolean?isTypeMatch(String?name,?@Nullable?Class<?>?typeToMatch)?throws?NoSuchBeanDefinitionException; ???/** ????*? ????*/ ???@Nullable ???Class<?>?getType(String?name)?throws?NoSuchBeanDefinitionException; ???/** ????*? ????*/ ???String[]?getAliases(String?name); }
getBean
創(chuàng)新互聯(lián)專(zhuān)注于鄖西企業(yè)網(wǎng)站建設(shè),成都響應(yīng)式網(wǎng)站建設(shè)公司,商城系統(tǒng)網(wǎng)站開(kāi)發(fā)。鄖西網(wǎng)站建設(shè)公司,為鄖西等地區(qū)提供建站服務(wù)。全流程按需開(kāi)發(fā)網(wǎng)站,專(zhuān)業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)專(zhuān)業(yè)和態(tài)度為您提供的服務(wù)
重載了(overload)5個(gè)getBean方法:可分為1.按照name獲取bean。2.按照type獲取bean。
其中g(shù)etBean(String name,Object... args)與getBean(Class<T> requiredType,Object... args)方法需要注意后面的參數(shù)Object是構(gòu)造方法的參數(shù)。另外bean的scope(bean在IOC容器中的生命周期)需要配置為prototype。
網(wǎng)站標(biāo)題:SpringBeanFactory
文章位置:http://aaarwkj.com/article32/igsgsc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供手機(jī)網(wǎng)站建設(shè)、品牌網(wǎng)站建設(shè)、網(wǎng)站排名、網(wǎng)站內(nèi)鏈、全網(wǎng)營(yíng)銷(xiāo)推廣、App設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)