Skip to content

Commit be698cf

Browse files
committed
Merge pull request #34628 from ivandimitrov8080
* pr/34628: Harmonize references to application.yaml files in reference docs Closes gh-34628
2 parents 81ade5d + f4db73e commit be698cf

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/application-properties.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include::attributes.adoc[]
55

66

77

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.
99
This appendix provides a list of common Spring Boot properties and references to the underlying classes that consume them.
1010

1111
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>>.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include::attributes.adoc[]
66

77

88
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.
1010

1111
The majority of the metadata file is generated automatically at compile time by processing all items annotated with `@ConfigurationProperties`.
1212
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.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Config data files are considered in the following order:
3535
. <<features#features.external-config.files.profile-specific,Profile-specific application properties>> outside of your packaged jar (`application-\{profile}.properties` and YAML variants).
3636

3737
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.
3939

4040
To provide a concrete example, suppose you develop a `@Component` that uses a `name` property, as shown in the following example:
4141

@@ -220,7 +220,7 @@ You cannot use a wildcard in a `classpath:` location.
220220
[[features.external-config.files.profile-specific]]
221221
==== Profile Specific Files
222222
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.
224224

225225
Profile-specific properties are loaded from the same locations as standard `application.properties`, with profile-specific files always overriding the non-specific ones.
226226
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
441441

442442
[[features.external-config.files.property-placeholders]]
443443
==== Property Placeholders
444-
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).
445445
The standard `$\{name}` property-placeholder syntax can be used anywhere within a value.
446446
Property placeholders can also specify a default value using a `:` to separate the default value from the property name, for example `${name:default}`.
447447

@@ -476,7 +476,7 @@ Spring Boot allows you to split a single physical file into multiple logical doc
476476
Documents are processed in order, from top to bottom.
477477
Later documents can override the properties defined in earlier ones.
478478

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.
480480
Three consecutive hyphens represent the end of one document, and the start of the next.
481481

482482
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:
834834
| Property | Note
835835

836836
| `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.
838838

839839
| `my.main-project.person.firstName`
840840
| Standard camel case syntax.
841841

842842
| `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.
844844

845845
| `MY_MAINPROJECT_PERSON_FIRSTNAME`
846846
| Upper case format, which is recommended when using system environment variables.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/profiles.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,5 @@ It is also possible to activate profiles by using Spring's `ConfigurableEnvironm
115115

116116
[[features.profiles.profile-specific-configuration-files]]
117117
=== Profile-specific Configuration Files
118-
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.
119119
See "<<features#features.external-config.files.profile-specific>>" for details.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ For example, to indicate that JRuby should be flagged for unpacking by using the
212212
[[howto.build.create-a-nonexecutable-jar]]
213213
=== Create a Non-executable JAR with Exclusions
214214
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.
216216

217217
In Maven, the executable jar must be the main artifact and you can add a classified jar for the library, as follows:
218218

@@ -236,7 +236,7 @@ In Maven, the executable jar must be the main artifact and you can add a classif
236236
<configuration>
237237
<classifier>lib</classifier>
238238
<excludes>
239-
<exclude>application.yml</exclude>
239+
<exclude>application.yaml</exclude>
240240
</excludes>
241241
</configuration>
242242
</execution>

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ You can also provide the following System properties (or environment variables)
146146
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.
147147

148148
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.
150150

151151
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`.
152152

@@ -187,7 +187,7 @@ YAML is a superset of JSON and, as such, is a convenient syntax for storing exte
187187
port: 9000
188188
----
189189

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.
191191
Then add `snakeyaml` to your dependencies (Maven coordinates `org.yaml:snakeyaml`, already included if you use the `spring-boot-starter`).
192192
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.
193193

@@ -287,7 +287,7 @@ Later values override earlier values.
287287

288288
[[howto.properties-and-configuration.discover-build-in-options-for-external-properties]]
289289
=== 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.
291291
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.
292292

293293
A running application with the Actuator features has a `configprops` endpoint that shows all the bound and bindable properties available through `@ConfigurationProperties`.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ You can configure this behavior by setting the configprop:server.compression.mim
182182

183183
[[howto.webserver.configure-ssl]]
184184
=== Configure SSL
185-
SSL can be configured declaratively by setting the various `+server.ssl.*+` properties, typically in `application.properties` or `application.yml`.
185+
SSL can be configured declaratively by setting the various `+server.ssl.*+` properties, typically in `application.properties` or `application.yaml`.
186186
The following example shows setting SSL properties using a Java KeyStore file:
187187

188188
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
@@ -280,7 +280,7 @@ As of Undertow 1.4.0+, both `h2` and `h2c` are supported on JDK 8 without any ad
280280

281281
[[howto.webserver.configure]]
282282
=== 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.
284284
See "`<<howto#howto.properties-and-configuration.discover-build-in-options-for-external-properties>>`").
285285
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.
286286
See the list of <<application-properties#appendix.application-properties>>.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/hazelcast.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You could also specify the Hazelcast configuration file to use through configura
2626
config: "classpath:config/my-hazelcast.xml"
2727
----
2828

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.
3030
We also check if the `hazelcast.config` system property is set.
3131
See the https://docs.hazelcast.org/docs/latest/manual/html-single/[Hazelcast documentation] for more details.
3232

0 commit comments

Comments
 (0)