Skip to content

Document that bean methods should be static when annotated with @ConfigurationPropertiesBinding #45621

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
wilkinsona opened this issue May 20, 2025 · 1 comment
Assignees
Labels
type: documentation A documentation update
Milestone

Comments

@wilkinsona
Copy link
Member

A bean annotated with @ConfigurationPropertiesBinding should be declared static as they're created early during bean post-processing for configuration property binding. When not declared as static, the bean method's @Configuration class is created early and becomes ineligible for full post-processing.

@wilkinsona
Copy link
Member Author

Re-opening to document this for @ConfigurationPropertiesBinding rather than @ConfigurationProperties.

@wilkinsona wilkinsona reopened this May 21, 2025
@wilkinsona wilkinsona self-assigned this May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

2 participants