diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc index 285758ebe009..a7e8f11169d7 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc @@ -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[] diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/nativeimage/advanced/nestedconfigurationproperties/MyProperties.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/nativeimage/advanced/nestedconfigurationproperties/MyProperties.java index f4d064e05ffd..0f73ef5dd68c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/nativeimage/advanced/nestedconfigurationproperties/MyProperties.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/nativeimage/advanced/nestedconfigurationproperties/MyProperties.java @@ -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 }