public interface BeanFactory { String FACTORY_BEAN_PREFIX = "&"; /** * */ Object getBean(String name) throws BeansException; /** * */T getBean(String name, @Nullable Class requiredType) throws BeansException; /** * */ Object getBean(String name, Object... args) throws BeansException; /** * */ T getBean(Class requiredType) throws BeansException; /** * */ T getBean(Class 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
创新互联专注于郧西企业网站建设,成都响应式网站建设公司,商城系统网站开发。郧西网站建设公司,为郧西等地区提供建站服务。全流程按需开发网站,专业设计,全程项目跟踪,创新互联专业和态度为您提供的服务
重载了(overload)5个getBean方法:可分为1.按照name获取bean。2.按照type获取bean。
其中getBean(String name,Object... args)与getBean(Class