Skip to content

BeanPostProcessor callbacks don't work as expected for @PostConstruct annotated methods [SPR-6066] #10734

Closed

Description

@spring-projects-issues

Joris Kuipers opened SPR-6066 and commented

Creating this issue per Juergen's request:
because support for @PostConstruct is implemented using a BeanPostProcessor, the BPP.postProcessBeforeInitialization method is invoked after the actual initialization method that has the annotation. This has always been the case since support for JSR-250 was added I think, but no issue was ever created to make sure to track this deficiency.
Added a simple test case that shows the described behavior,


Affects: 2.5.6, 3.0 M4

Attachments:

Referenced from: commits 7428014, fcaf692, c495cbb

Activity

  1. spring-projects-issues commented on Nov 11, 2009

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    I've finally addressed this through re-ordering our post-processors: Internal ones simply kick in after regular ones now. That seems to work fine in all common cases.

    Juergen

  2. added
    type: bug
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions