DerekYRC / DerekYRC/mini-spring
关于getBean返回值的一个问题
- Dominant language
- Java
- Stars
- 6.4k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
如题,在Application-context分支下的AbstractApplicationContext的refresh方法会创建beanFactory并加载bean的属性,之后再实例化bean时执行preInstantiateSingletons方法。
这个方法我有一点看不懂,beanDefinitionMap中已经有四个对象(person、car、customBeanFactoryPostProcessor、customerBeanPostProcessor)。之后再引用getBean方法返回DefaultListableBeanFactory的意义是什么?

Contributor guide
No contributing guide indexed for this repository
Research direction
Start with AbstractApplicationContext.refresh on the Application-context branch, then follow preInstantiateSingletons and getBean in DefaultListableBeanFactory. The author asks about the relationship between beanDefinitionMap entries and subsequent getBean calls, but requests no concrete change. Clarify whether an explanation or documentation update is wanted before defining completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 22/100