Skip to content

the issue of doCreateBean #34442

Open
Open
@799332391

Description

@799332391

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#doCreateBean

if (earlySingletonExposure) {
			Object earlySingletonReference = getSingleton(beanName, false);
			if (earlySingletonReference != null) {
				if (exposedObject == bean) {
					exposedObject = earlySingletonReference;
				}

exposedObject = earlySingletonReference;
If this assignment is indeed not redundant, it suggests that the custom getEarlyBeanReference method results in the reference no longer pointing to the final, fully initialized bean. Consequently, would the subsequent execution of registered bean destruction callbacks become unnecessary in this scenario?

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: waiting-for-triageAn issue we've not yet triaged or decided on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions