Skip to content

SmartInitializingSingleton.afterSingletonsInstantiated() is not called for lazy beans [SPR-12913] #17512

Closed
@spring-projects-issues

Description

@spring-projects-issues

Alex Panchenko opened SPR-12913 and commented

I understand that the primary purpose of this interface is to be implemented by non-lazy beans.

I have the following case:

  • initially developed as non-lazy bean, everything works as expected
  • some time later I change that bean to be lazy (e.g. lazy-init="true" in xml)
  • it is not initialized anymore, and I have to change this interface to InitializingBean

I would suggest still calling this interface and logging a warning, that it is less useful in a lazy bean.

WDYT? Should I create a PR?


Affects: 4.1.6

Issue Links:

1 votes, 1 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions