Commit 08272c92 authored by Stephane Nicoll's avatar Stephane Nicoll

Polish "Make editorial changes to appendix-configuration-metadata.adoc"

Closes gh-10874
parent 78838fb2
...@@ -103,8 +103,8 @@ exist in their own right. ...@@ -103,8 +103,8 @@ exist in their own right.
Finally, "`hints`" are additional information used to assist the user in configuring a Finally, "`hints`" are additional information used to assist the user in configuring a
given property. For example, when a developer is configuring the given property. For example, when a developer is configuring the
`spring.jpa.hibernate.ddl-auto` property, a tool can use the hints to offer some `spring.jpa.hibernate.ddl-auto` property, a tool can use the hints to offer some
auto-completion help for the `none`, `validate`, `update`, `create`, auto-completion help for the `none`, `validate`, `update`, `create`, and `create-drop`
and `create-drop` values. values.
...@@ -219,7 +219,7 @@ contain the following attributes: ...@@ -219,7 +219,7 @@ contain the following attributes:
|`reason` |`reason`
|String |String
|A short description of the reason why the property was deprecated. If no reason is |A short description of the reason why the property was deprecated. If no reason is
available, it may be omitted. It is recommended that descriptions be short paragraphs, available, it may be omitted. It is recommended that descriptions be short paragraphs,
with the first line providing a concise summary. The last line in the description should with the first line providing a concise summary. The last line in the description should
end with a period (`.`). end with a period (`.`).
...@@ -314,7 +314,7 @@ the attributes described in the following table: ...@@ -314,7 +314,7 @@ the attributes described in the following table:
|`value` |`value`
| Object | Object
| A valid value for the element to which the hint refers. If the type of the property is | A valid value for the element to which the hint refers. If the type of the property is
an array, it can also be an array of value(s). This attribute is mandatory. an array, it can also be an array of value(s). This attribute is mandatory.
|`description` |`description`
| String | String
...@@ -436,7 +436,8 @@ The following table summarizes the list of supported providers: ...@@ -436,7 +436,8 @@ The following table summarizes the list of supported providers:
class that is specified by the `target` parameter. class that is specified by the `target` parameter.
|`handle-as` |`handle-as`
|Handles the property as if it were defined by the type defined by the mandatory `target` parameter. |Handles the property as if it were defined by the type defined by the mandatory `target`
parameter.
|`logger-name` |`logger-name`
|Auto-completes valid logger names. Typically, package and class names available in |Auto-completes valid logger names. Typically, package and class names available in
...@@ -514,8 +515,8 @@ provider supports the following parameters: ...@@ -514,8 +515,8 @@ provider supports the following parameters:
|=== |===
The following metadata snippet corresponds to the standard The following metadata snippet corresponds to the standard `server.servlet.jsp.class-name`
`server.servlet.jsp.class-name` property that defines the `JspServlet` class name to use: property that defines the `JspServlet` class name to use:
[source,json,indent=0] [source,json,indent=0]
---- ----
...@@ -549,7 +550,8 @@ on the classpath. This provider supports the following parameters: ...@@ -549,7 +550,8 @@ on the classpath. This provider supports the following parameters:
| **`target`** | **`target`**
| `String` (`Class`) | `String` (`Class`)
|_none_ |_none_
|The fully qualified name of the type to consider for the property. This parameter is mandatory. |The fully qualified name of the type to consider for the property. This parameter is
mandatory.
|=== |===
The following types can be used: The following types can be used:
...@@ -557,19 +559,22 @@ The following types can be used: ...@@ -557,19 +559,22 @@ The following types can be used:
* Any `java.lang.Enum`: Lists the possible values for the property. (We recommend * Any `java.lang.Enum`: Lists the possible values for the property. (We recommend
defining the property with the `Enum` type, as no further hint should be required for defining the property with the `Enum` type, as no further hint should be required for
the IDE to auto-complete the values.) the IDE to auto-complete the values.)
* `java.nio.charset.Charset`: Supports auto-completion of charset/encoding values (such as `UTF-8`) * `java.nio.charset.Charset`: Supports auto-completion of charset/encoding values (such as
`UTF-8`)
* `java.util.Locale`: auto-completion of locales (such as `en_US`) * `java.util.Locale`: auto-completion of locales (such as `en_US`)
* `org.springframework.util.MimeType`: Supports auto-completion of content type values (such as `text/plain`) * `org.springframework.util.MimeType`: Supports auto-completion of content type values
* `org.springframework.core.io.Resource`: Supports auto-completion of Spring’s Resource abstraction to (such as `text/plain`)
refer to a file on the filesystem or on the classpath. (such as `classpath:/sample.properties`) * `org.springframework.core.io.Resource`: Supports auto-completion of Spring’s Resource
abstraction to refer to a file on the filesystem or on the classpath. (such as
`classpath:/sample.properties`)
TIP: If multiple values can be provided, use a `Collection` or _Array_ type to teach the IDE TIP: If multiple values can be provided, use a `Collection` or _Array_ type to teach the
about it. IDE about it.
The following metadata snippet corresponds to the standard `spring.liquibase.change-log` The following metadata snippet corresponds to the standard `spring.liquibase.change-log`
property that defines the path to the changelog to use. It is actually used internally as a property that defines the path to the changelog to use. It is actually used internally as a
`org.springframework.core.io.Resource` but cannot be exposed as such, because we need to keep the `org.springframework.core.io.Resource` but cannot be exposed as such, because we need to
original String value to pass it to the Liquibase API. keep the original String value to pass it to the Liquibase API.
[source,json,indent=0] [source,json,indent=0]
---- ----
...@@ -692,9 +697,8 @@ that defines the name of the `MBeanServer` bean to use: ...@@ -692,9 +697,8 @@ that defines the name of the `MBeanServer` bean to use:
]} ]}
---- ----
NOTE: The binder is not aware of the metadata. If you provide that hint, you NOTE: The binder is not aware of the metadata. If you provide that hint, you still need
still need to transform the bean name into an actual Bean reference using by to transform the bean name into an actual Bean reference using by the `ApplicationContext`.
the `ApplicationContext`.
...@@ -761,10 +765,10 @@ is used to populate the `description` attribute. ...@@ -761,10 +765,10 @@ is used to populate the `description` attribute.
NOTE: You should only use simple text with `@ConfigurationProperties` field Javadoc, since NOTE: You should only use simple text with `@ConfigurationProperties` field Javadoc, since
they are not processed before being added to the JSON. they are not processed before being added to the JSON.
Properties are discovered through the presence of standard getters and setters with special Properties are discovered through the presence of standard getters and setters with
handling for collection types (that is detected even if only a getter is present). The special handling for collection types (that is detected even if only a getter is present).
annotation processor also supports the use of the `@Data`, `@Getter`, and `@Setter` lombok The annotation processor also supports the use of the `@Data`, `@Getter`, and `@Setter`
annotations. lombok annotations.
[NOTE] [NOTE]
==== ====
...@@ -818,8 +822,8 @@ Consider the following class: ...@@ -818,8 +822,8 @@ Consider the following class:
} }
---- ----
The preceding example produces metdata information for `server.name`, `server.host.ip`, and The preceding example produces metdata information for `server.name`, `server.host.ip`,
`server.host.port` properties. You can use the `@NestedConfigurationProperty` and `server.host.port` properties. You can use the `@NestedConfigurationProperty`
annotation on a field to indicate that a regular (non-inner) class should be treated as annotation on a field to indicate that a regular (non-inner) class should be treated as
if it were nested. if it were nested.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment