Spring getBean方法源码解析
User user = (User) beanFactory.getBean("user");
注:User为一普通bean
查看方法(AbstractBeanFactory#getBean)
public Object getBean(String name) throws BeansException {
return doGetBean(name, null, null, false);
}
继续查看方法(AbstractBeanFactory#doGetBean)
protected
@Nullable final Object[] args, boolean typeCheckOnly
共有 0 条评论