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/application-properties.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ include::attributes.adoc[]
5
5
6
6
7
7
8
-
Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
8
+
Various properties can be specified inside your `application.properties` file, inside your `application.yaml` file, or as command line switches.
9
9
This appendix provides a list of common Spring Boot properties and references to the underlying classes that consume them.
10
10
11
11
TIP: Spring Boot provides various conversion mechanism with advanced value formatting, make sure to review <<features#features.external-config.typesafe-configuration-properties.conversion, the properties conversion section>>.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ include::attributes.adoc[]
6
6
7
7
8
8
Spring Boot jars include metadata files that provide details of all supported configuration properties.
9
-
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.
9
+
The files are designed to let IDE developers offer contextual help and "`code completion`" as users are working with `application.properties` or `application.yaml` files.
10
10
11
11
The majority of the metadata file is generated automatically at compile time by processing all items annotated with `@ConfigurationProperties`.
12
12
However, it is possible to <<configuration-metadata#appendix.configuration-metadata.annotation-processor.adding-additional-metadata,write part of the metadata manually>> for corner cases or more advanced use cases.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Config data files are considered in the following order:
35
35
. <<features#features.external-config.files.profile-specific,Profile-specific application properties>> outside of your packaged jar (`application-\{profile}.properties` and YAML variants).
36
36
37
37
NOTE: It is recommended to stick with one format for your entire application.
38
-
If you have configuration files with both `.properties` and `.yml` format in the same location, `.properties` takes precedence.
38
+
If you have configuration files with both `.properties` and YAML format in the same location, `.properties` takes precedence.
39
39
40
40
To provide a concrete example, suppose you develop a `@Component` that uses a `name` property, as shown in the following example:
41
41
@@ -220,7 +220,7 @@ You cannot use a wildcard in a `classpath:` location.
As well as `application` property files, Spring Boot will also attempt to load profile-specific files using the naming convention `application-\{profile}`.
223
-
For example, if your application activates a profile named `prod` and uses YAML files, then both `application.yml` and `application-prod.yml` will be considered.
223
+
For example, if your application activates a profile named `prod` and uses YAML files, then both `application.yaml` and `application-prod.yaml` will be considered.
224
224
225
225
Profile-specific properties are loaded from the same locations as standard `application.properties`, with profile-specific files always overriding the non-specific ones.
226
226
If several profiles are specified, a last-wins strategy applies.
@@ -441,7 +441,7 @@ For example, if a secret named `db.password` is mounted at location `/run/secret
The values in `application.properties` and `application.yml` are filtered through the existing `Environment` when they are used, so you can refer back to previously defined values (for example, from System properties or environment variables).
444
+
The values in `application.properties` and `application.yaml` are filtered through the existing `Environment` when they are used, so you can refer back to previously defined values (for example, from System properties or environment variables).
445
445
The standard `$\{name}` property-placeholder syntax can be used anywhere within a value.
446
446
Property placeholders can also specify a default value using a `:` to separate the default value from the property name, for example `${name:default}`.
447
447
@@ -476,7 +476,7 @@ Spring Boot allows you to split a single physical file into multiple logical doc
476
476
Documents are processed in order, from top to bottom.
477
477
Later documents can override the properties defined in earlier ones.
478
478
479
-
For `application.yml` files, the standard YAML multi-document syntax is used.
479
+
For `application.yaml` files, the standard YAML multi-document syntax is used.
480
480
Three consecutive hyphens represent the end of one document, and the start of the next.
481
481
482
482
For example, the following file has two logical documents:
@@ -834,13 +834,13 @@ With the preceding code, the following properties names can all be used:
834
834
| Property | Note
835
835
836
836
| `my.main-project.person.first-name`
837
-
| Kebab case, which is recommended for use in `.properties` and `.yml` files.
837
+
| Kebab case, which is recommended for use in `.properties` and YAML files.
838
838
839
839
| `my.main-project.person.firstName`
840
840
| Standard camel case syntax.
841
841
842
842
| `my.main-project.person.first_name`
843
-
| Underscore notation, which is an alternative format for use in `.properties` and `.yml` files.
843
+
| Underscore notation, which is an alternative format for use in `.properties` and YAML files.
844
844
845
845
| `MY_MAINPROJECT_PERSON_FIRSTNAME`
846
846
| Upper case format, which is recommended when using system environment variables.
Profile-specific variants of both `application.properties` (or `application.yml`) and files referenced through `@ConfigurationProperties` are considered as files and loaded.
118
+
Profile-specific variants of both `application.properties` (or `application.yaml`) and files referenced through `@ConfigurationProperties` are considered as files and loaded.
119
119
See "<<features#features.external-config.files.profile-specific>>" for details.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ For example, to indicate that JRuby should be flagged for unpacking by using the
212
212
[[howto.build.create-a-nonexecutable-jar]]
213
213
=== Create a Non-executable JAR with Exclusions
214
214
Often, if you have an executable and a non-executable jar as two separate build products, the executable version has additional configuration files that are not needed in a library jar.
215
-
For example, the `application.yml` configuration file might be excluded from the non-executable JAR.
215
+
For example, the `application.yaml` configuration file might be excluded from the non-executable JAR.
216
216
217
217
In Maven, the executable jar must be the main artifact and you can add a classified jar for the library, as follows:
218
218
@@ -236,7 +236,7 @@ In Maven, the executable jar must be the main artifact and you can add a classif
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,7 @@ You can also provide the following System properties (or environment variables)
146
146
A separate `Environment` property source is set up for this document and it can be overridden by system properties, environment variables, or the command line.
147
147
148
148
No matter what you set in the environment, Spring Boot always loads `application.properties` as described above.
149
-
By default, if YAML is used, then files with the '`.yml`' extension are also added to the list.
149
+
By default, if YAML is used, then files with the '`.yaml`' and '`.yml`' extension are also added to the list.
150
150
151
151
TIP: If you want detailed information about the files that are being loaded you can <<features#features.logging.log-levels, set the logging level>> of `org.springframework.boot.context.config` to `trace`.
152
152
@@ -187,7 +187,7 @@ YAML is a superset of JSON and, as such, is a convenient syntax for storing exte
187
187
port: 9000
188
188
----
189
189
190
-
Create a file called `application.yml` and put it in the root of your classpath.
190
+
Create a file called `application.yaml` and put it in the root of your classpath.
191
191
Then add `snakeyaml` to your dependencies (Maven coordinates `org.yaml:snakeyaml`, already included if you use the `spring-boot-starter`).
192
192
A YAML file is parsed to a Java `Map<String,Object>` (like a JSON object), and Spring Boot flattens the map so that it is one level deep and has period-separated keys, as many people are used to with `Properties` files in Java.
193
193
@@ -287,7 +287,7 @@ Later values override earlier values.
=== Discover Built-in Options for External Properties
290
-
Spring Boot binds external properties from `application.properties` (or `.yml` files and other places) into an application at runtime.
290
+
Spring Boot binds external properties from `application.properties` (or YAML files and other places) into an application at runtime.
291
291
There is not (and technically cannot be) an exhaustive list of all supported properties in a single location, because contributions can come from additional jar files on your classpath.
292
292
293
293
A running application with the Actuator features has a `configprops` endpoint that shows all the bound and bindable properties available through `@ConfigurationProperties`.
@@ -280,7 +280,7 @@ As of Undertow 1.4.0+, both `h2` and `h2c` are supported on JDK 8 without any ad
280
280
281
281
[[howto.webserver.configure]]
282
282
=== Configure the Web Server
283
-
Generally, you should first consider using one of the many available configuration keys and customize your web server by adding new entries in your `application.properties` or `application.yml` file.
283
+
Generally, you should first consider using one of the many available configuration keys and customize your web server by adding new entries in your `application.properties` or `application.yaml` file.
284
284
See "`<<howto#howto.properties-and-configuration.discover-build-in-options-for-external-properties>>`").
285
285
The `server.{asterisk}` namespace is quite useful here, and it includes namespaces like `server.tomcat.{asterisk}`, `server.jetty.{asterisk}` and others, for server-specific features.
286
286
See the list of <<application-properties#appendix.application-properties>>.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/hazelcast.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ You could also specify the Hazelcast configuration file to use through configura
26
26
config: "classpath:config/my-hazelcast.xml"
27
27
----
28
28
29
-
Otherwise, Spring Boot tries to find the Hazelcast configuration from the default locations: `hazelcast.xml` in the working directory or at the root of the classpath, or a `.yaml`/`.yml` counterpart in the same locations.
29
+
Otherwise, Spring Boot tries to find the Hazelcast configuration from the default locations: `hazelcast.xml` in the working directory or at the root of the classpath, or a YAML counterpart in the same locations.
30
30
We also check if the `hazelcast.config` system property is set.
31
31
See the https://docs.hazelcast.org/docs/latest/manual/html-single/[Hazelcast documentation] for more details.
0 commit comments