Skip to content
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

Support @NestedConfigurationProperty at targets other than field #9109

Open
snicoll opened this issue May 5, 2017 · 2 comments · May be fixed by #38844
Open

Support @NestedConfigurationProperty at targets other than field #9109

snicoll opened this issue May 5, 2017 · 2 comments · May be fixed by #38844
Labels
theme: config-data Issues related to the configuration theme type: enhancement A general enhancement

Comments

@snicoll
Copy link
Member

snicoll commented May 5, 2017

@NestedConfigurationProperty can't be set in the getter. If a nested property is deprecated, the field is usually removed (to remap to the new namespace). There should be a way to specify that annotation at getter level

If a nested property is deprecated all its keys should be flagged as deprecated automatically as well.

@snicoll snicoll added priority: low type: enhancement A general enhancement labels May 5, 2017
@wilkinsona wilkinsona added the theme: config-data Issues related to the configuration theme label Feb 6, 2019
@wilkinsona wilkinsona added this to the 2.2.x milestone Feb 6, 2019
@wilkinsona wilkinsona changed the title Support @NestedConfigurationProperty at method level Support @NestedConfigurationProperty at targets other than field Feb 6, 2019
@pkostrzewa
Copy link
Contributor

I can take a look at this with some guidance.

Are you asking to extend NestedConfigurationProperty's target with ElementType.METHOD?

Additionally, should configuration processor check whether a method annotated with NestedConfigurationProperty is actually a getter?

@philwebb philwebb changed the title Support @NestedConfigurationProperty at targets other than field Support @NestedConfigurationProperty at targets other than field Apr 18, 2019
@philwebb philwebb modified the milestones: 2.2.x, General Backlog May 24, 2019
@regulskimichal
Copy link

Also, this could be useful in case of using @ConstructorBinding. Right now, there is no way of telling Spring Boot to create metadata for a POJO injected via constructor.

jaredtbates added a commit to jaredtbates/spring-boot that referenced this issue Dec 16, 2023
Adds support for getters with NestedConfigurationProperty.

Closes spring-projectsgh-9109
jaredtbates added a commit to jaredtbates/spring-boot that referenced this issue Dec 17, 2023
Adds support for getters with NestedConfigurationProperty.

Closes spring-projectsgh-9109
jaredtbates added a commit to jaredtbates/spring-boot that referenced this issue Dec 17, 2023
Adds support for getters with NestedConfigurationProperty.

Closes spring-projectsgh-9109
@jaredtbates jaredtbates linked a pull request Dec 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: config-data Issues related to the configuration theme type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants