Skip to content

Commit 08272c9

Browse files
committed
Polish "Make editorial changes to appendix-configuration-metadata.adoc"
Closes gh-10874
1 parent 78838fb commit 08272c9

File tree

1 file changed

+47
-43
lines changed

1 file changed

+47
-43
lines changed

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

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ exist in their own right.
103103
Finally, "`hints`" are additional information used to assist the user in configuring a
104104
given property. For example, when a developer is configuring the
105105
`spring.jpa.hibernate.ddl-auto` property, a tool can use the hints to offer some
106-
auto-completion help for the `none`, `validate`, `update`, `create`,
107-
and `create-drop` values.
106+
auto-completion help for the `none`, `validate`, `update`, `create`, and `create-drop`
107+
values.
108108

109109

110110

@@ -131,7 +131,7 @@ following table:
131131
|`description`
132132
| String
133133
| A short description of the group that can be displayed to users. If not description is
134-
available, it may be omitted. It is recommended that descriptions be short paragraphs,
134+
available, it may be omitted. It is recommended that descriptions be short paragraphs,
135135
with the first line providing a concise summary. The last line in the description should
136136
end with a period (`.`).
137137

@@ -163,7 +163,7 @@ in the following table:
163163
|`name`
164164
| String
165165
| The full name of the property. Names are in lower-case period-separated form (for
166-
example, `server.servlet.path`). This attribute is mandatory.
166+
example, `server.servlet.path`). This attribute is mandatory.
167167

168168
|`type`
169169
| String
@@ -172,13 +172,13 @@ in the following table:
172172
You can use this attribute to guide the user as to the types of values that they can
173173
enter. For consistency, the type of a primitive is specified by using its wrapper
174174
counterpart (for example, `boolean` becomes `java.lang.Boolean`). Note that this class
175-
may be a complex type that gets converted from a `String` as values are bound. If the
176-
type is not known, it may be omitted.
175+
may be a complex type that gets converted from a `String` as values are bound. If the
176+
type is not known, it may be omitted.
177177

178178
|`description`
179179
| String
180180
| A short description of the group that can be displayed to users. If no description is
181-
available, it may be omitted. It is recommended that descriptions be short paragraphs,
181+
available, it may be omitted. It is recommended that descriptions be short paragraphs,
182182
with the first line providing a concise summary. The last line in the description should
183183
end with a period (`.`).
184184

@@ -187,19 +187,19 @@ in the following table:
187187
| The class name of the source that contributed this property. For example, if the
188188
property were from a class annotated with `@ConfigurationProperties`, this attribute
189189
would contain the fully qualified name of that class. If the source type is unknown, it
190-
may be omitted.
190+
may be omitted.
191191

192192
|`defaultValue`
193193
| Object
194194
| The default value, which is used if the property is not specified. If the type of the
195-
property is an array, it can be an array of value(s). If the default value is unknown,
196-
it may be omitted.
195+
property is an array, it can be an array of value(s). If the default value is unknown,
196+
it may be omitted.
197197

198198
|`deprecation`
199199
| Deprecation
200200
| Specify whether the property is deprecated. If the field is not deprecated or if that
201-
information is not known, it may be omitted. The next table offers more detail about
202-
the `deprecation` attribute.
201+
information is not known, it may be omitted. The next table offers more detail about
202+
the `deprecation` attribute.
203203
|===
204204

205205
The JSON object contained in the `deprecation` attribute of each `properties` element can
@@ -219,7 +219,7 @@ contain the following attributes:
219219
|`reason`
220220
|String
221221
|A short description of the reason why the property was deprecated. If no reason is
222-
available, it may be omitted. It is recommended that descriptions be short paragraphs,
222+
available, it may be omitted. It is recommended that descriptions be short paragraphs,
223223
with the first line providing a concise summary. The last line in the description should
224224
end with a period (`.`).
225225

@@ -287,20 +287,20 @@ following table:
287287
|`name`
288288
| String
289289
| The full name of the property to which this hint refers. Names are in lower-case
290-
period-separated form (such as `server.servlet.path`). If the property refers to a map
291-
(such as `system.contexts`), the hint either applies to the _keys_ of the map
292-
(`system.context.keys`) or the _values_ (`system.context.values`) of the map. This
293-
attribute is mandatory.
290+
period-separated form (such as `server.servlet.path`). If the property refers to a map
291+
(such as `system.contexts`), the hint either applies to the _keys_ of the map
292+
(`system.context.keys`) or the _values_ (`system.context.values`) of the map. This
293+
attribute is mandatory.
294294

295295
|`values`
296296
| ValueHint[]
297297
| A list of valid values as defined by the `ValueHint` object (described in the next
298-
table). Each entry defines the value and may have a description.
298+
table). Each entry defines the value and may have a description.
299299

300300
|`providers`
301301
| ValueProvider[]
302302
| A list of providers as defined by the `ValueProvider` object (described later in this
303-
document). Each entry defines the name of the provider and its parameters, if any.
303+
document). Each entry defines the name of the provider and its parameters, if any.
304304

305305
|===
306306

@@ -314,12 +314,12 @@ the attributes described in the following table:
314314
|`value`
315315
| Object
316316
| A valid value for the element to which the hint refers. If the type of the property is
317-
an array, it can also be an array of value(s). This attribute is mandatory.
317+
an array, it can also be an array of value(s). This attribute is mandatory.
318318

319319
|`description`
320320
| String
321321
| A short description of the value that can be displayed to users. If no description is
322-
available, it may be omitted . It is recommended that descriptions be short paragraphs,
322+
available, it may be omitted . It is recommended that descriptions be short paragraphs,
323323
with the first line providing a concise summary. The last line in the description should
324324
end with a period (`.`).
325325
|===
@@ -416,7 +416,7 @@ supports it, this is by far the most effective approach to auto-completion.
416416
==== Value Providers
417417
Providers are a powerful way to attach semantics to a property. In this section, we
418418
define the official providers that you can use for your own hints. However, your favorite
419-
IDE may implement some of these or none of them. Also, it could eventually provide its
419+
IDE may implement some of these or none of them. Also, it could eventually provide its
420420
own.
421421

422422
NOTE: As this is a new feature, IDE vendors must catch up with how it works. Adoption
@@ -436,7 +436,8 @@ The following table summarizes the list of supported providers:
436436
class that is specified by the `target` parameter.
437437

438438
|`handle-as`
439-
|Handles the property as if it were defined by the type defined by the mandatory `target` parameter.
439+
|Handles the property as if it were defined by the type defined by the mandatory `target`
440+
parameter.
440441

441442
|`logger-name`
442443
|Auto-completes valid logger names. Typically, package and class names available in
@@ -514,8 +515,8 @@ provider supports the following parameters:
514515
|===
515516

516517

517-
The following metadata snippet corresponds to the standard
518-
`server.servlet.jsp.class-name` property that defines the `JspServlet` class name to use:
518+
The following metadata snippet corresponds to the standard `server.servlet.jsp.class-name`
519+
property that defines the `JspServlet` class name to use:
519520

520521
[source,json,indent=0]
521522
----
@@ -549,27 +550,31 @@ on the classpath. This provider supports the following parameters:
549550
| **`target`**
550551
| `String` (`Class`)
551552
|_none_
552-
|The fully qualified name of the type to consider for the property. This parameter is mandatory.
553+
|The fully qualified name of the type to consider for the property. This parameter is
554+
mandatory.
553555
|===
554556

555557
The following types can be used:
556558

557559
* Any `java.lang.Enum`: Lists the possible values for the property. (We recommend
558560
defining the property with the `Enum` type, as no further hint should be required for
559561
the IDE to auto-complete the values.)
560-
* `java.nio.charset.Charset`: Supports auto-completion of charset/encoding values (such as `UTF-8`)
562+
* `java.nio.charset.Charset`: Supports auto-completion of charset/encoding values (such as
563+
`UTF-8`)
561564
* `java.util.Locale`: auto-completion of locales (such as `en_US`)
562-
* `org.springframework.util.MimeType`: Supports auto-completion of content type values (such as `text/plain`)
563-
* `org.springframework.core.io.Resource`: Supports auto-completion of Spring’s Resource abstraction to
564-
refer to a file on the filesystem or on the classpath. (such as `classpath:/sample.properties`)
565+
* `org.springframework.util.MimeType`: Supports auto-completion of content type values
566+
(such as `text/plain`)
567+
* `org.springframework.core.io.Resource`: Supports auto-completion of Spring’s Resource
568+
abstraction to refer to a file on the filesystem or on the classpath. (such as
569+
`classpath:/sample.properties`)
565570

566-
TIP: If multiple values can be provided, use a `Collection` or _Array_ type to teach the IDE
567-
about it.
571+
TIP: If multiple values can be provided, use a `Collection` or _Array_ type to teach the
572+
IDE about it.
568573

569574
The following metadata snippet corresponds to the standard `spring.liquibase.change-log`
570575
property that defines the path to the changelog to use. It is actually used internally as a
571-
`org.springframework.core.io.Resource` but cannot be exposed as such, because we need to keep the
572-
original String value to pass it to the Liquibase API.
576+
`org.springframework.core.io.Resource` but cannot be exposed as such, because we need to
577+
keep the original String value to pass it to the Liquibase API.
573578

574579
[source,json,indent=0]
575580
----
@@ -692,9 +697,8 @@ that defines the name of the `MBeanServer` bean to use:
692697
]}
693698
----
694699

695-
NOTE: The binder is not aware of the metadata. If you provide that hint, you
696-
still need to transform the bean name into an actual Bean reference using by
697-
the `ApplicationContext`.
700+
NOTE: The binder is not aware of the metadata. If you provide that hint, you still need
701+
to transform the bean name into an actual Bean reference using by the `ApplicationContext`.
698702

699703

700704

@@ -761,10 +765,10 @@ is used to populate the `description` attribute.
761765
NOTE: You should only use simple text with `@ConfigurationProperties` field Javadoc, since
762766
they are not processed before being added to the JSON.
763767

764-
Properties are discovered through the presence of standard getters and setters with special
765-
handling for collection types (that is detected even if only a getter is present). The
766-
annotation processor also supports the use of the `@Data`, `@Getter`, and `@Setter` lombok
767-
annotations.
768+
Properties are discovered through the presence of standard getters and setters with
769+
special handling for collection types (that is detected even if only a getter is present).
770+
The annotation processor also supports the use of the `@Data`, `@Getter`, and `@Setter`
771+
lombok annotations.
768772

769773
[NOTE]
770774
====
@@ -818,8 +822,8 @@ Consider the following class:
818822
}
819823
----
820824

821-
The preceding example produces metdata information for `server.name`, `server.host.ip`, and
822-
`server.host.port` properties. You can use the `@NestedConfigurationProperty`
825+
The preceding example produces metdata information for `server.name`, `server.host.ip`,
826+
and `server.host.port` properties. You can use the `@NestedConfigurationProperty`
823827
annotation on a field to indicate that a regular (non-inner) class should be treated as
824828
if it were nested.
825829

0 commit comments

Comments
 (0)