Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
704992e6
Commit
704992e6
authored
Aug 13, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x'
Closes gh-17855
parents
ccf9b1b9
fcf46806
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
16 deletions
+23
-16
configuration-metadata.adoc
...cs/src/main/asciidoc/appendix/configuration-metadata.adoc
+23
-16
No files found.
spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix/configuration-metadata.adoc
View file @
704992e6
...
@@ -821,20 +821,21 @@ The annotation processor also supports the use of the `@Data`, `@Getter`, and `@
...
@@ -821,20 +821,21 @@ The annotation processor also supports the use of the `@Data`, `@Getter`, and `@
lombok
annotations
.
lombok
annotations
.
The
annotation
processor
cannot
auto
-
detect
default
values
for
``
Enum
``
s
and
``
Collections
``
s
.
The
annotation
processor
cannot
auto
-
detect
default
values
for
``
Enum
``
s
and
In
the
cases
where
a
`
Collection
`
or
`
Enum
`
property
has
a
non
-
empty
default
value
,
``
Collections
``
s
.
In
the
cases
where
a
`
Collection
`
or
`
Enum
`
property
has
a
non
-
empty
<<
configuration
-
metadata
-
additional
-
metadata
,
manual
metadata
>>
should
be
provided
.
default
value
,
<<
configuration
-
metadata
-
additional
-
metadata
,
manual
metadata
>>
should
be
provided
.
Consider
the
following
class
:
Consider
the
following
class
:
[
source
,
java
,
indent
=
0
,
subs
=
"verbatim,quotes,attributes"
]
[
source
,
java
,
indent
=
0
,
subs
=
"verbatim,quotes,attributes"
]
----
----
@
ConfigurationProperties
(
prefix
=
"
rabbit
"
)
@
ConfigurationProperties
(
prefix
=
"
acme.messaging
"
)
public
class
Rabbit
Properties
{
public
class
Messaging
Properties
{
private
List
<
String
>
addresses
=
new
ArrayList
<>(
Arrays
.
asList
(
"a"
,
"b"
))
;
private
List
<
String
>
addresses
=
new
ArrayList
<>(
Arrays
.
asList
(
"a"
,
"b"
))
;
private
ContainerType
=
ContainerType
.
SIMPLE
;
private
ContainerType
=
ContainerType
.
SIMPLE
;
//
...
getter
and
setters
//
...
getter
and
setters
...
@@ -849,21 +850,27 @@ Consider the following class:
...
@@ -849,21 +850,27 @@ Consider the following class:
}
}
----
----
In
order
to
document
default
values
for
properties
in
the
class
above
,
you
could
add
the
following
In
order
to
document
default
values
for
properties
in
the
class
above
,
you
could
add
the
JSON
to
<<
configuration
-
metadata
-
additional
-
metadata
,
the
manual
metadata
of
the
module
>>:
following
content
to
<<
configuration
-
metadata
-
additional
-
metadata
,
the
manual
metadata
of
the
module
>>:
[
source
,
json
,
indent
=
0
]
[
source
,
json
,
indent
=
0
]
----
----
{
{
"properties"
:
[
"name"
:
"rabbit.addresses"
,
{
"defaultValue"
:
"a, b"
"name"
:
"acme.messaging.addresses"
,
},
"defaultValue"
:
[
"a, b"
]
{
},
"name"
:
"rabbit.container-type"
,
{
"defaultValue"
:
"simple"
"name"
:
"acme.messaging.container-type"
,
}
"defaultValue"
:
"simple"
}
]}
----
----
Only
the
`
name
`
of
the
property
is
required
to
document
additional
fields
with
manual
metadata
.
[
NOTE
]
[
NOTE
]
====
====
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment