Skip to content

Commit cabd798

Browse files
committed
Polish NestedConfigurationProperty documentation
Closes gh-9895
1 parent 7db7ccf commit cabd798

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,8 @@ Will produce meta-data information for `server.name`, `server.host.ip` and
815815
annotation on a field to indicate that a regular (non-inner) class should be treated as
816816
if it were nested.
817817

818+
TIP: This has no effect on collections and maps as those types are automatically
819+
identified and a single meta-data property is generated for each of them.
818820

819821

820822
[[configuration-metadata-additional-metadata]]

spring-boot/src/main/java/org/springframework/boot/context/properties/NestedConfigurationProperty.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,7 +26,10 @@
2626
* Indicates that a field in a {@link ConfigurationProperties} object should be treated as
2727
* if it were a nested type. This annotation has no bearing on the actual binding
2828
* processes, but it is used by the {@code spring-boot-configuration-processor} as a hint
29-
* that a field is not bound as a single value.
29+
* that a field is not bound as a single value. When this is specified, a nested group is
30+
* created for the field and its type is harvested.
31+
* <p>
32+
* This has no effect on collections and maps as these types are automatically identified.
3033
*
3134
* @author Stephane Nicoll
3235
* @author Phillip Webb

0 commit comments

Comments
 (0)