Skip to content

Commit

Permalink
Refine example to show @NestedConfigurationProperty usage
Browse files Browse the repository at this point in the history
Closes gh-33239
  • Loading branch information
mhalbritter committed Nov 18, 2022
1 parent 5c10ae2 commit 5a88468
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Expand Up @@ -6,7 +6,7 @@
[[native-image.advanced.nested-configuration-properties]]
=== Nested Configuration Properties
Reflection hints are automatically created for configuration properties by the Spring ahead-of-time engine.
Nested configuration properties, however, *must* be annotated with `@NestedConfigurationProperty`, otherwise they won't be detected and will not be bindable.
Nested configuration properties which are no inner classes, however, *must* be annotated with `@NestedConfigurationProperty`, otherwise they won't be detected and will not be bindable.

include::code:MyProperties[]

Expand Down
Expand Up @@ -41,20 +41,20 @@ public Nested getNested() {
}
// @fold:off

public static class Nested {
}

private int number;
class Nested {

// @fold:on // getters / setters...
public int getNumber() {
return this.number;
}
private int number;

public void setNumber(int number) {
this.number = number;
}
// @fold:off
// @fold:on // getters / setters...
public int getNumber() {
return this.number;
}

public void setNumber(int number) {
this.number = number;
}
// @fold:off

}

0 comments on commit 5a88468

Please sign in to comment.