Replace "folder" with "directory"
Consistently use the term "directory" instead of "folder" Closes gh-21218
This commit is contained in:
@@ -89,7 +89,7 @@ Any dependencies that are required when running embedded but are not required wh
|
||||
|
||||
[[executable-jar-war-index-files]]
|
||||
=== Index Files
|
||||
Spring Boot Loader-compatible jar and war archives can include additional index files under the `BOOT-INF/` folder.
|
||||
Spring Boot Loader-compatible jar and war archives can include additional index files under the `BOOT-INF/` directory.
|
||||
A `classpath.idx` file can be provided for both jars and wars, it provides the ordering that jars should be added to the classpath.
|
||||
The `layers.idx` file can be used only for jars, it allows a jar to be split into logical layers for Docker/OCI image creation.
|
||||
|
||||
@@ -101,7 +101,7 @@ These files, however, are _not_ parsed internally as YAML and they must be writt
|
||||
[[executable-jar-war-index-files-classpath]]
|
||||
=== Classpath Index
|
||||
The classpath index file can be provided in `BOOT-INF/classpath.idx`.
|
||||
It provides a list of jar names (not including the folder) in the order that they should be added to the classpath.
|
||||
It provides a list of jar names (not including the directory) in the order that they should be added to the classpath.
|
||||
Each line must start with dash space (`"-·"`) and names must be in double quotes.
|
||||
|
||||
For example, given the following jar:
|
||||
@@ -136,9 +136,9 @@ The classpath index file can be provided in `BOOT-INF/layers.idx`.
|
||||
It provides a list of layers and the parts of the jar that should be contained within them.
|
||||
Layers are written in the order that they should be added to the Docker/OCI image.
|
||||
Layers names are written as quoted strings prefixed with dash space (`"-·"`) and with a colon (`":"`) suffix.
|
||||
Layer content is either a file or folder name written as a quoted string prefixed by space space dash space (`"··-·"`).
|
||||
A folder name ends with `/`, a file name does not.
|
||||
When a folder name is used it means that all files inside that folder are in the same layer.
|
||||
Layer content is either a file or directory name written as a quoted string prefixed by space space dash space (`"··-·"`).
|
||||
A directory name ends with `/`, a file name does not.
|
||||
When a directory name is used it means that all files inside that directory are in the same layer.
|
||||
|
||||
A typical example of a layers index would be:
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ You need to remember to start Ant using the `-lib` option, as shown in the follo
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
----
|
||||
$ ant -lib <folder containing spring-boot-antlib-{spring-boot-version}.jar>
|
||||
$ ant -lib <directory containing spring-boot-antlib-{spring-boot-version}.jar>
|
||||
----
|
||||
|
||||
TIP: The "`Using Spring Boot`" section includes a more complete example of <<using-spring-boot.adoc#using-boot-ant, using Apache Ant with `spring-boot-antlib`>>.
|
||||
|
||||
@@ -365,8 +365,8 @@ Before we begin, open a terminal and run the following commands to ensure that y
|
||||
Java version: 1.8.0_102, vendor: Oracle Corporation
|
||||
----
|
||||
|
||||
NOTE: This sample needs to be created in its own folder.
|
||||
Subsequent instructions assume that you have created a suitable folder and that it is your current directory.
|
||||
NOTE: This sample needs to be created in its own directory.
|
||||
Subsequent instructions assume that you have created a suitable directory and that it is your current directory.
|
||||
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ If you run `mvn dependency:tree` again, you see that there are now a number of a
|
||||
[[getting-started-first-application-code]]
|
||||
=== Writing the Code
|
||||
To finish our application, we need to create a single Java file.
|
||||
By default, Maven compiles sources from `src/main/java`, so you need to create that folder structure and then add a file named `src/main/java/Example.java` to contain the following code:
|
||||
By default, Maven compiles sources from `src/main/java`, so you need to create that directory structure and then add a file named `src/main/java/Example.java` to contain the following code:
|
||||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
|
||||
@@ -605,7 +605,7 @@ To enable that support, your application needs to have two additional dependenci
|
||||
Spring Boot ships by default with Tomcat 9.0.x which supports HTTP/2 out of the box when using JDK 9 or later.
|
||||
Alternatively, HTTP/2 can be used on JDK 8 if the `libtcnative` library and its dependencies are installed on the host operating system.
|
||||
|
||||
The library folder must be made available, if not already, to the JVM library path.
|
||||
The library directory must be made available, if not already, to the JVM library path.
|
||||
You can do so with a JVM argument such as `-Djava.library.path=/usr/local/opt/tomcat-native/lib`.
|
||||
More on this in the https://tomcat.apache.org/tomcat-9.0-doc/apr.html[official Tomcat documentation].
|
||||
|
||||
@@ -2019,7 +2019,7 @@ Spring Boot supports two higher-level migration tools: https://flywaydb.org/[Fly
|
||||
To automatically run Flyway database migrations on startup, add the `org.flywaydb:flyway-core` to your classpath.
|
||||
|
||||
Typically, migrations are scripts in the form `V<VERSION>__<NAME>.sql` (with `<VERSION>` an underscore-separated version, such as '`1`' or '`2_1`').
|
||||
By default, they are in a folder called `classpath:db/migration`, but you can modify that location by setting `spring.flyway.locations`.
|
||||
By default, they are in a directory called `classpath:db/migration`, but you can modify that location by setting `spring.flyway.locations`.
|
||||
This is a comma-separated list of one or more `classpath:` or `filesystem:` locations.
|
||||
For example, the following configuration would search for scripts in both the default classpath location and the `/opt/migration` directory:
|
||||
|
||||
@@ -2036,7 +2036,7 @@ Assume the following:
|
||||
spring.flyway.locations=classpath:db/migration/{vendor}
|
||||
----
|
||||
|
||||
Rather than using `db/migration`, the preceding configuration sets the folder to use according to the type of the database (such as `db/migration/mysql` for MySQL).
|
||||
Rather than using `db/migration`, the preceding configuration sets the directory to use according to the type of the database (such as `db/migration/mysql` for MySQL).
|
||||
The list of supported databases is available in {spring-boot-module-code}/jdbc/DatabaseDriver.java[`DatabaseDriver`].
|
||||
|
||||
Migrations can also be written in Java.
|
||||
@@ -2049,7 +2049,7 @@ Spring Boot calls `Flyway.migrate()` to perform the database migration.
|
||||
If you would like more control, provide a `@Bean` that implements {spring-boot-autoconfigure-module-code}/flyway/FlywayMigrationStrategy.java[`FlywayMigrationStrategy`].
|
||||
|
||||
Flyway supports SQL and Java https://flywaydb.org/documentation/callbacks.html[callbacks].
|
||||
To use SQL-based callbacks, place the callback scripts in the `classpath:db/migration` folder.
|
||||
To use SQL-based callbacks, place the callback scripts in the `classpath:db/migration` directory.
|
||||
To use Java-based callbacks, create one or more beans that implement `Callback`.
|
||||
Any such beans are automatically registered with `Flyway`.
|
||||
They can be ordered by using `@Order` or by implementing `Ordered`.
|
||||
|
||||
@@ -447,7 +447,7 @@ Property values can be injected directly into your beans by using the `@Value` a
|
||||
Spring Boot uses a very particular `PropertySource` order that is designed to allow sensible overriding of values.
|
||||
Properties are considered in the following order:
|
||||
|
||||
. <<using-spring-boot.adoc#using-boot-devtools-globalsettings,Devtools global settings properties>> in the `$HOME/.config/spring-boot` folder when devtools is active.
|
||||
. <<using-spring-boot.adoc#using-boot-devtools-globalsettings,Devtools global settings properties>> in the `$HOME/.config/spring-boot` directory when devtools is active.
|
||||
. {spring-framework-api}/test/context/TestPropertySource.html[`@TestPropertySource`] annotations on your tests.
|
||||
. `properties` attribute on your tests.
|
||||
Available on {spring-boot-test-module-api}/context/SpringBootTest.html[`@SpringBootTest`] and the <<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests,test annotations for testing a particular slice of your application>>.
|
||||
@@ -2482,11 +2482,11 @@ In the preceding example, if `YourException` is thrown by a controller defined i
|
||||
|
||||
[[boot-features-error-handling-custom-error-pages]]
|
||||
===== Custom Error Pages
|
||||
If you want to display a custom HTML error page for a given status code, you can add a file to an `/error` folder.
|
||||
Error pages can either be static HTML (that is, added under any of the static resource folders) or be built by using templates.
|
||||
If you want to display a custom HTML error page for a given status code, you can add a file to an `/error` directory.
|
||||
Error pages can either be static HTML (that is, added under any of the static resource directories) or be built by using templates.
|
||||
The name of the file should be the exact status code or a series mask.
|
||||
|
||||
For example, to map `404` to a static HTML file, your folder structure would be as follows:
|
||||
For example, to map `404` to a static HTML file, your directory structure would be as follows:
|
||||
|
||||
[source,indent=0,subs="verbatim,quotes,attributes"]
|
||||
----
|
||||
@@ -2501,7 +2501,7 @@ For example, to map `404` to a static HTML file, your folder structure would be
|
||||
+- <other public assets>
|
||||
----
|
||||
|
||||
To map all `5xx` errors by using a FreeMarker template, your folder structure would be as follows:
|
||||
To map all `5xx` errors by using a FreeMarker template, your directory structure would be as follows:
|
||||
|
||||
[source,indent=0,subs="verbatim,quotes,attributes"]
|
||||
----
|
||||
@@ -2828,11 +2828,11 @@ For a more complete picture, you can also subclass `DefaultErrorWebExceptionHand
|
||||
|
||||
[[boot-features-webflux-error-handling-custom-error-pages]]
|
||||
===== Custom Error Pages
|
||||
If you want to display a custom HTML error page for a given status code, you can add a file to an `/error` folder.
|
||||
Error pages can either be static HTML (that is, added under any of the static resource folders) or built with templates.
|
||||
If you want to display a custom HTML error page for a given status code, you can add a file to an `/error` directory.
|
||||
Error pages can either be static HTML (that is, added under any of the static resource directories) or built with templates.
|
||||
The name of the file should be the exact status code or a series mask.
|
||||
|
||||
For example, to map `404` to a static HTML file, your folder structure would be as follows:
|
||||
For example, to map `404` to a static HTML file, your directory structure would be as follows:
|
||||
|
||||
[source,indent=0,subs="verbatim,quotes,attributes"]
|
||||
----
|
||||
@@ -2847,7 +2847,7 @@ For example, to map `404` to a static HTML file, your folder structure would be
|
||||
+- <other public assets>
|
||||
----
|
||||
|
||||
To map all `5xx` errors by using a Mustache template, your folder structure would be as follows:
|
||||
To map all `5xx` errors by using a Mustache template, your directory structure would be as follows:
|
||||
|
||||
[source,indent=0,subs="verbatim,quotes,attributes"]
|
||||
----
|
||||
@@ -8157,7 +8157,7 @@ Assuming the above `Dockerfile` is in the current directory, your docker image c
|
||||
----
|
||||
|
||||
This is a multi-stage dockerfile.
|
||||
The builder stage extracts the folders that are needed later.
|
||||
The builder stage extracts the directories that are needed later.
|
||||
Each of the `COPY` commands relates to the layers extracted by the jarmode.
|
||||
|
||||
Of course, a Dockerfile can be written without using the jarmode.
|
||||
|
||||
@@ -578,7 +578,7 @@ TIP: For a complete list of the properties that are applied by the devtools, see
|
||||
=== Automatic Restart
|
||||
Applications that use `spring-boot-devtools` automatically restart whenever files on the classpath change.
|
||||
This can be a useful feature when working in an IDE, as it gives a very fast feedback loop for code changes.
|
||||
By default, any entry on the classpath that points to a folder is monitored for changes.
|
||||
By default, any entry on the classpath that points to a directory is monitored for changes.
|
||||
Note that certain resources, such as static assets and view templates, <<using-boot-devtools-restart-exclude, do not need to restart the application>>.
|
||||
|
||||
.Triggering a restart
|
||||
@@ -767,7 +767,7 @@ If you start multiple applications from your IDE, only the first has LiveReload
|
||||
|
||||
[[using-boot-devtools-globalsettings]]
|
||||
=== Global Settings
|
||||
You can configure global devtools settings by adding any of the following files to the `$HOME/.config/spring-boot` folder:
|
||||
You can configure global devtools settings by adding any of the following files to the `$HOME/.config/spring-boot` directory:
|
||||
|
||||
. `spring-boot-devtools.properties`
|
||||
. `spring-boot-devtools.yaml`
|
||||
@@ -782,7 +782,7 @@ For example, to configure restart to always use a <<using-boot-devtools-restart-
|
||||
spring.devtools.restart.trigger-file=.reloadtrigger
|
||||
----
|
||||
|
||||
NOTE: If devtools configuration files are not found in `$HOME/.config/spring-boot`, the root of the `$HOME` folder is searched for the presence of a `.spring-boot-devtools.properties` file.
|
||||
NOTE: If devtools configuration files are not found in `$HOME/.config/spring-boot`, the root of the `$HOME` directory is searched for the presence of a `.spring-boot-devtools.properties` file.
|
||||
This allows you to share the devtools global configuration with applications that are on an older version of Spring Boot that does not support the `$HOME/.config/spring-boot` location.
|
||||
|
||||
[NOTE]
|
||||
@@ -807,7 +807,7 @@ If you observe such problems constantly, try increasing the `spring.devtools.res
|
||||
spring.devtools.restart.quiet-period=1s
|
||||
----
|
||||
|
||||
The monitored classpath folders are now polled every 2 seconds for changes, and a 1 second quiet period is maintained to make sure there are no additional class changes.
|
||||
The monitored classpath directories are now polled every 2 seconds for changes, and a 1 second quiet period is maintained to make sure there are no additional class changes.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user