Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Sep 2, 2009 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

@spring-projects-issues
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants