diff --git a/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc b/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc index 464e82701d..d31a05196c 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc @@ -815,6 +815,8 @@ Will produce meta-data information for `server.name`, `server.host.ip` and annotation on a field to indicate that a regular (non-inner) class should be treated as if it were nested. +TIP: This has no effect on collections and maps as those types are automatically +identified and a single meta-data property is generated for each of them. [[configuration-metadata-additional-metadata]] diff --git a/spring-boot/src/main/java/org/springframework/boot/context/properties/NestedConfigurationProperty.java b/spring-boot/src/main/java/org/springframework/boot/context/properties/NestedConfigurationProperty.java index ebb78b3491..4cdf6a7551 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/properties/NestedConfigurationProperty.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/properties/NestedConfigurationProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,10 @@ import java.lang.annotation.Target; * Indicates that a field in a {@link ConfigurationProperties} object should be treated as * if it were a nested type. This annotation has no bearing on the actual binding * processes, but it is used by the {@code spring-boot-configuration-processor} as a hint - * that a field is not bound as a single value. + * that a field is not bound as a single value. When this is specified, a nested group is + * created for the field and its type is harvested. + *

+ * This has no effect on collections and maps as these types are automatically identified. * * @author Stephane Nicoll * @author Phillip Webb