You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/appendix-application-properties.adoc
+17-17
Original file line number
Diff line number
Diff line change
@@ -7,103 +7,103 @@ include::attributes.adoc[]
7
7
Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
8
8
This appendix provides a list of common Spring Boot properties and references to the underlying classes that consume them.
9
9
10
-
TIP: Spring Boot provides various conversion mechanism with advanced value formatting, make sure to review <<spring-boot-features.adoc#boot-features-external-config-conversion, the properties conversion section>>.
10
+
TIP: Spring Boot provides various conversion mechanism with advanced value formatting, make sure to review <<spring-boot-features.adoc#features.external-config.typesafe-configuration-properties.conversion, the properties conversion section>>.
11
11
12
12
NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/appendix-configuration-metadata.adoc
+26-26
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ Spring Boot jars include metadata files that provide details of all supported co
7
7
The files are designed to let IDE developers offer contextual help and "`code completion`" as users are working with `application.properties` or `application.yml` files.
8
8
9
9
The majority of the metadata file is generated automatically at compile time by processing all items annotated with `@ConfigurationProperties`.
10
-
However, it is possible to <<configuration-metadata-additional-metadata,write part of the metadata manually>> for corner cases or more advanced use cases.
10
+
However, it is possible to <<configuration-metadata.annotation-processor.adding-additional-metadata,write part of the metadata manually>> for corner cases or more advanced use cases.
11
11
12
12
13
13
14
-
[[configuration-metadata-format]]
14
+
[[configuration-metadata.format]]
15
15
== Metadata Format
16
16
Configuration metadata files are located inside jars under `META-INF/spring-configuration-metadata.json`.
17
17
They use a JSON format with items categorized under either "`groups`" or "`properties`" and additional values hints categorized under "hints", as shown in the following example:
@@ -98,7 +98,7 @@ For example, when a developer is configuring the configprop:spring.jpa.hibernate
98
98
99
99
100
100
101
-
[[configuration-metadata-group-attributes]]
101
+
[[configuration-metadata.format.group]]
102
102
=== Group Attributes
103
103
The JSON object contained in the `groups` array can contain the attributes shown in the following table:
104
104
@@ -139,7 +139,7 @@ The JSON object contained in the `groups` array can contain the attributes shown
139
139
140
140
141
141
142
-
[[configuration-metadata-property-attributes]]
142
+
[[configuration-metadata.format.property]]
143
143
=== Property Attributes
144
144
The JSON object contained in the `properties` array can contain the attributes described in the following table:
145
145
@@ -254,7 +254,7 @@ Doing so is particularly useful when a `replacement` is provided.
254
254
255
255
256
256
257
-
[[configuration-metadata-hints-attributes]]
257
+
[[configuration-metadata.format.hints]]
258
258
=== Hint Attributes
259
259
The JSON object contained in the `hints` array can contain the attributes shown in the following table:
260
260
@@ -317,15 +317,15 @@ The JSON object contained in the `providers` attribute of each `hint` element ca
317
317
318
318
319
319
320
-
[[configuration-metadata-repeated-items]]
320
+
[[configuration-metadata.format.repeated-items]]
321
321
=== Repeated Metadata Items
322
322
Objects with the same "`property`" and "`group`" name can appear multiple times within a metadata file.
323
323
For example, you could bind two separate classes to the same prefix, with each having potentially overlapping property names.
324
324
While the same names appearing in the metadata multiple times should not be common, consumers of metadata should take care to ensure that they support it.
325
325
326
326
327
327
328
-
[[configuration-metadata-providing-manual-hints]]
328
+
[[configuration-metadata.manual-hints]]
329
329
== Providing Manual Hints
330
330
To improve the user experience and further assist the user in configuring a given property, you can provide additional metadata that:
331
331
@@ -334,10 +334,10 @@ To improve the user experience and further assist the user in configuring a give
The `name` attribute of each hint refers to the `name` of a property.
340
-
In the <<configuration-metadata-format,initial example shown earlier>>, we provide five values for the `spring.jpa.hibernate.ddl-auto` property: `none`, `validate`, `update`, `create`, and `create-drop`.
340
+
In the <<configuration-metadata.format,initial example shown earlier>>, we provide five values for the `spring.jpa.hibernate.ddl-auto` property: `none`, `validate`, `update`, `create`, and `create-drop`.
341
341
Each value may have a description as well.
342
342
343
343
If your property is of type `Map`, you can provide hints for both the keys and the values (but not for the map itself).
@@ -356,7 +356,7 @@ Assume a `sample.contexts` maps magic `String` values to an integer, as shown in
356
356
----
357
357
358
358
The magic values are (in this example) are `sample1` and `sample2`.
359
-
In order to offer additional content assistance for the keys, you could add the following JSON to <<configuration-metadata-additional-metadata,the manual metadata of the module>>:
359
+
In order to offer additional content assistance for the keys, you could add the following JSON to <<configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
360
360
361
361
[source,json,indent=0]
362
362
----
@@ -380,7 +380,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp
The **handle-as** provider lets you substitute the type of the property to a more high-level type.
509
509
This typically happens when the property has a `java.lang.String` type, because you do not want your configuration classes to rely on classes that may not be on the classpath.
@@ -553,9 +553,9 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c
The **spring-profile-name** provider auto-completes the Spring profiles that are defined in the configuration of the current project.
686
686
@@ -702,14 +702,14 @@ The following metadata snippet corresponds to the standard `spring.profiles.acti
702
702
703
703
704
704
705
-
[[configuration-metadata-annotation-processor]]
705
+
[[configuration-metadata.annotation-processor]]
706
706
== Generating Your Own Metadata by Using the Annotation Processor
707
707
You can easily generate your own configuration metadata file from items annotated with `@ConfigurationProperties` by using the `spring-boot-configuration-processor` jar.
708
708
The jar includes a Java annotation processor which is invoked as your project is compiled.
The processor picks up both classes and methods that are annotated with `@ConfigurationProperties`.
769
769
@@ -807,7 +807,7 @@ The annotation processor applies a number of heuristics to extract the default v
807
807
Default values have to be provided statically. In particular, do not refer to a constant defined in another class.
808
808
Also, the annotation processor cannot auto-detect default values for ``Enum``s and ``Collections``s.
809
809
810
-
For cases where the default value could not be detected, <<configuration-metadata-additional-metadata,manual metadata>> should be provided.
810
+
For cases where the default value could not be detected, <<configuration-metadata.annotation-processor.adding-additional-metadata,manual metadata>> should be provided.
@@ -831,7 +831,7 @@ Consider the following example:
831
831
}
832
832
----
833
833
834
-
In order to document default values for properties in the class above, you could add the following content to <<configuration-metadata-additional-metadata,the manual metadata of the module>>:
834
+
In order to document default values for properties in the class above, you could add the following content to <<configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
835
835
836
836
[source,json,indent=0]
837
837
----
@@ -851,7 +851,7 @@ NOTE: Only the `name` of the property is required to document additional metadat
Spring Boot's configuration file handling is quite flexible, and it is often the case that properties may exist that are not bound to a `@ConfigurationProperties` bean.
894
894
You may also need to tune some attributes of an existing key.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/appendix-dependency-versions.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This appendix provides details of the dependencies that are managed by Spring Bo
7
7
8
8
9
9
10
-
[[dependency-versions-coordinates]]
10
+
[[dependency-versions.coordinates]]
11
11
== Managed Dependency Coordinates
12
12
13
13
The following table provides details of all of the dependency versions that are provided by Spring Boot in its CLI (Command Line Interface), Maven dependency management, and Gradle plugin.
0 commit comments