Commit d5adbbb6 authored by Andy Wilkinson's avatar Andy Wilkinson

Split appendices into multiple pages and include a ToC in each

Closes gh-16289
parent 81ddebbc
:numbered!: :numbered!:
[appendix] [appendix]
[[common-application-properties]] [[common-application-properties]]
== Common application properties = Common Application properties
include::{asciidoc-sources-root}/attributes.adoc[] include::{asciidoc-sources-root}/attributes.adoc[]
Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches. Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
...@@ -14,66 +13,66 @@ NOTE: Property contributions can come from additional jar files on your classpat ...@@ -14,66 +13,66 @@ NOTE: Property contributions can come from additional jar files on your classpat
Also, you can define your own properties. Also, you can define your own properties.
=== Core properties == Core properties
include::{generated-resources-root}/config-docs/core.adoc[] include::{generated-resources-root}/config-docs/core.adoc[]
=== Cache properties == Cache properties
include::{generated-resources-root}/config-docs/cache.adoc[] include::{generated-resources-root}/config-docs/cache.adoc[]
=== Mail properties == Mail properties
include::{generated-resources-root}/config-docs/mail.adoc[] include::{generated-resources-root}/config-docs/mail.adoc[]
=== JSON properties == JSON properties
include::{generated-resources-root}/config-docs/json.adoc[] include::{generated-resources-root}/config-docs/json.adoc[]
=== Data properties == Data properties
include::{generated-resources-root}/config-docs/data.adoc[] include::{generated-resources-root}/config-docs/data.adoc[]
=== Transaction properties == Transaction properties
include::{generated-resources-root}/config-docs/transaction.adoc[] include::{generated-resources-root}/config-docs/transaction.adoc[]
=== Data migration properties == Data migration properties
include::{generated-resources-root}/config-docs/data-migration.adoc[] include::{generated-resources-root}/config-docs/data-migration.adoc[]
=== Integration properties == Integration properties
include::{generated-resources-root}/config-docs/integration.adoc[] include::{generated-resources-root}/config-docs/integration.adoc[]
=== Web properties == Web properties
include::{generated-resources-root}/config-docs/web.adoc[] include::{generated-resources-root}/config-docs/web.adoc[]
=== Templating properties == Templating properties
include::{generated-resources-root}/config-docs/templating.adoc[] include::{generated-resources-root}/config-docs/templating.adoc[]
=== Server properties == Server properties
include::{generated-resources-root}/config-docs/server.adoc[] include::{generated-resources-root}/config-docs/server.adoc[]
=== Security properties == Security properties
include::{generated-resources-root}/config-docs/security.adoc[] include::{generated-resources-root}/config-docs/security.adoc[]
=== RSocket properties == RSocket properties
include::{generated-resources-root}/config-docs/rsocket.adoc[] include::{generated-resources-root}/config-docs/rsocket.adoc[]
=== Actuator properties == Actuator properties
include::{generated-resources-root}/config-docs/actuator.adoc[] include::{generated-resources-root}/config-docs/actuator.adoc[]
=== Devtools properties == Devtools properties
include::{generated-resources-root}/config-docs/devtools.adoc[] include::{generated-resources-root}/config-docs/devtools.adoc[]
=== Testing properties == Testing properties
include::{generated-resources-root}/config-docs/testing.adoc[] include::{generated-resources-root}/config-docs/testing.adoc[]
[appendix] [appendix]
[[auto-configuration-classes]] [[auto-configuration-classes]]
== Auto-configuration classes = Auto-configuration Classes
include::{asciidoc-sources-root}/attributes.adoc[] include::{asciidoc-sources-root}/attributes.adoc[]
Here is a list of all auto-configuration classes provided by Spring Boot, with links to documentation and source code. This appendix contains details of all of the auto-configuration classes provided by Spring Boot, with links to documentation and source code.
Remember to also look at the conditions report in your application for more details of which features are switched on. Remember to also look at the conditions report in your application for more details of which features are switched on.
(To do so, start the app with `--debug` or `-Ddebug` or, in an Actuator application, use the `conditions` endpoint). (To do so, start the app with `--debug` or `-Ddebug` or, in an Actuator application, use the `conditions` endpoint).
[[auto-configuration-classes-from-autoconfigure-module]] [[auto-configuration-classes-from-autoconfigure-module]]
=== From the "`spring-boot-autoconfigure`" module == `spring-boot-autoconfigure`
The following auto-configuration classes are from the `spring-boot-autoconfigure` module: The following auto-configuration classes are from the `spring-boot-autoconfigure` module:
include::{generated-resources-root}/auto-configuration-classes-spring-boot-autoconfigure.adoc[] include::{generated-resources-root}/auto-configuration-classes-spring-boot-autoconfigure.adoc[]
...@@ -19,7 +18,7 @@ include::{generated-resources-root}/auto-configuration-classes-spring-boot-autoc ...@@ -19,7 +18,7 @@ include::{generated-resources-root}/auto-configuration-classes-spring-boot-autoc
[[auto-configuration-classes-from-actuator]] [[auto-configuration-classes-from-actuator]]
=== From the "`spring-boot-actuator-autoconfigure`" module == `spring-boot-actuator-autoconfigure`
The following auto-configuration classes are from the `spring-boot-actuator-autoconfigure` module: The following auto-configuration classes are from the `spring-boot-actuator-autoconfigure` module:
include::{generated-resources-root}/auto-configuration-classes-spring-boot-actuator-autoconfigure.adoc[] include::{generated-resources-root}/auto-configuration-classes-spring-boot-actuator-autoconfigure.adoc[]
[appendix] [appendix]
[[configuration-metadata]] [[configuration-metadata]]
== Configuration Metadata = Configuration Metadata
include::{asciidoc-sources-root}/attributes.adoc[] include::{asciidoc-sources-root}/attributes.adoc[]
Spring Boot jars include metadata files that provide details of all supported configuration properties. Spring Boot jars include metadata files that provide details of all supported configuration properties.
...@@ -13,7 +12,7 @@ However, it is possible to <<configuration-metadata-additional-metadata,write pa ...@@ -13,7 +12,7 @@ However, it is possible to <<configuration-metadata-additional-metadata,write pa
[[configuration-metadata-format]] [[configuration-metadata-format]]
=== Metadata Format == Metadata Format
Configuration metadata files are located inside jars under `META-INF/spring-configuration-metadata.json`. Configuration metadata files are located inside jars under `META-INF/spring-configuration-metadata.json`.
They use a simple JSON format with items categorized under either "`groups`" or "`properties`" and additional values hints categorized under "hints", as shown in the following example: They use a simple JSON format with items categorized under either "`groups`" or "`properties`" and additional values hints categorized under "hints", as shown in the following example:
...@@ -100,7 +99,7 @@ For example, when a developer is configuring the `spring.jpa.hibernate.ddl-auto` ...@@ -100,7 +99,7 @@ For example, when a developer is configuring the `spring.jpa.hibernate.ddl-auto`
[[configuration-metadata-group-attributes]] [[configuration-metadata-group-attributes]]
==== Group Attributes === Group Attributes
The JSON object contained in the `groups` array can contain the attributes shown in the following table: The JSON object contained in the `groups` array can contain the attributes shown in the following table:
[cols="1,1,4"] [cols="1,1,4"]
...@@ -141,7 +140,7 @@ The JSON object contained in the `groups` array can contain the attributes shown ...@@ -141,7 +140,7 @@ The JSON object contained in the `groups` array can contain the attributes shown
[[configuration-metadata-property-attributes]] [[configuration-metadata-property-attributes]]
==== Property Attributes === Property Attributes
The JSON object contained in the `properties` array can contain the attributes described in the following table: The JSON object contained in the `properties` array can contain the attributes described in the following table:
[cols="1,1,4"] [cols="1,1,4"]
...@@ -256,7 +255,7 @@ Doing so is particularly useful when a `replacement` is provided. ...@@ -256,7 +255,7 @@ Doing so is particularly useful when a `replacement` is provided.
[[configuration-metadata-hints-attributes]] [[configuration-metadata-hints-attributes]]
==== Hint Attributes === Hint Attributes
The JSON object contained in the `hints` array can contain the attributes shown in the following table: The JSON object contained in the `hints` array can contain the attributes shown in the following table:
[cols="1,1,4"] [cols="1,1,4"]
...@@ -319,7 +318,7 @@ The JSON object contained in the `providers` attribute of each `hint` element ca ...@@ -319,7 +318,7 @@ The JSON object contained in the `providers` attribute of each `hint` element ca
[[configuration-metadata-repeated-items]] [[configuration-metadata-repeated-items]]
==== Repeated Metadata Items === Repeated Metadata Items
Objects with the same "`property`" and "`group`" name can appear multiple times within a metadata file. Objects with the same "`property`" and "`group`" name can appear multiple times within a metadata file.
For example, you could bind two separate classes to the same prefix, with each having potentially overlapping property names. For example, you could bind two separate classes to the same prefix, with each having potentially overlapping property names.
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. 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.
...@@ -327,14 +326,14 @@ While the same names appearing in the metadata multiple times should not be comm ...@@ -327,14 +326,14 @@ While the same names appearing in the metadata multiple times should not be comm
[[configuration-metadata-providing-manual-hints]] [[configuration-metadata-providing-manual-hints]]
=== Providing Manual Hints == Providing Manual Hints
To improve the user experience and further assist the user in configuring a given property, you can provide additional metadata that: To improve the user experience and further assist the user in configuring a given property, you can provide additional metadata that:
* Describes the list of potential values for a property. * Describes the list of potential values for a property.
* Associates a provider, to attach a well defined semantic to a property, so that a tool can discover the list of potential values based on the project's context. * Associates a provider, to attach a well defined semantic to a property, so that a tool can discover the list of potential values based on the project's context.
==== Value Hint === Value Hint
The `name` attribute of each hint refers to the `name` of a property. The `name` attribute of each hint refers to the `name` of a property.
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`. 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`.
Each value may have a description as well. Each value may have a description as well.
...@@ -379,7 +378,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp ...@@ -379,7 +378,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp
==== Value Providers === Value Providers
Providers are a powerful way to attach semantics to a property. Providers are a powerful way to attach semantics to a property.
In this section, we define the official providers that you can use for your own hints. In this section, we define the official providers that you can use for your own hints.
However, your favorite IDE may implement some of these or none of them. However, your favorite IDE may implement some of these or none of them.
...@@ -422,7 +421,7 @@ If no provider for a given property is supported, no special content assistance ...@@ -422,7 +421,7 @@ If no provider for a given property is supported, no special content assistance
===== Any ==== Any
The special **any** provider value permits any additional values to be provided. The special **any** provider value permits any additional values to be provided.
Regular value validation based on the property type should be applied if this is supported. Regular value validation based on the property type should be applied if this is supported.
...@@ -454,7 +453,7 @@ The following example offers `on` and `off` as auto-completion values for `syste ...@@ -454,7 +453,7 @@ The following example offers `on` and `off` as auto-completion values for `syste
Note that, in the preceding example, any other value is also allowed. Note that, in the preceding example, any other value is also allowed.
===== Class Reference ==== Class Reference
The **class-reference** provider auto-completes classes available in the project. The **class-reference** provider auto-completes classes available in the project.
This provider supports the following parameters: This provider supports the following parameters:
...@@ -497,7 +496,7 @@ The following metadata snippet corresponds to the standard `server.servlet.jsp.c ...@@ -497,7 +496,7 @@ The following metadata snippet corresponds to the standard `server.servlet.jsp.c
===== Handle As ==== Handle As
The **handle-as** provider lets you substitute the type of the property to a more high-level type. The **handle-as** provider lets you substitute the type of the property to a more high-level type.
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. 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.
This provider supports the following parameters: This provider supports the following parameters:
...@@ -546,7 +545,7 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c ...@@ -546,7 +545,7 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c
===== Logger Name ==== Logger Name
The **logger-name** provider auto-completes valid logger names and <<spring-boot-features.adoc#boot-features-custom-log-groups,logger groups>>. The **logger-name** provider auto-completes valid logger names and <<spring-boot-features.adoc#boot-features-custom-log-groups,logger groups>>.
Typically, package and class names available in the current project can be auto-completed. Typically, package and class names available in the current project can be auto-completed.
If groups are enabled (default) and if a custom logger group is identified in the configuration, auto-completion for it should be provided. If groups are enabled (default) and if a custom logger group is identified in the configuration, auto-completion for it should be provided.
...@@ -632,7 +631,7 @@ As Spring Boot defines a few logger groups out-of-the-box, dedicated value hints ...@@ -632,7 +631,7 @@ As Spring Boot defines a few logger groups out-of-the-box, dedicated value hints
===== Spring Bean Reference ==== Spring Bean Reference
The **spring-bean-reference** provider auto-completes the beans that are defined in the configuration of the current project. The **spring-bean-reference** provider auto-completes the beans that are defined in the configuration of the current project.
This provider supports the following parameters: This provider supports the following parameters:
...@@ -671,7 +670,7 @@ If you provide that hint, you still need to transform the bean name into an actu ...@@ -671,7 +670,7 @@ If you provide that hint, you still need to transform the bean name into an actu
===== Spring Profile Name ==== Spring Profile Name
The **spring-profile-name** provider auto-completes the Spring profiles that are defined in the configuration of the current project. The **spring-profile-name** provider auto-completes the Spring profiles that are defined in the configuration of the current project.
The following metadata snippet corresponds to the standard `spring.profiles.active` property that defines the name of the Spring profile(s) to enable: The following metadata snippet corresponds to the standard `spring.profiles.active` property that defines the name of the Spring profile(s) to enable:
...@@ -693,7 +692,7 @@ The following metadata snippet corresponds to the standard `spring.profiles.acti ...@@ -693,7 +692,7 @@ The following metadata snippet corresponds to the standard `spring.profiles.acti
[[configuration-metadata-annotation-processor]] [[configuration-metadata-annotation-processor]]
=== Generating Your Own Metadata by Using the Annotation Processor == Generating Your Own Metadata by Using the Annotation Processor
You can easily generate your own configuration metadata file from items annotated with `@ConfigurationProperties` by using the `spring-boot-configuration-processor` jar. You can easily generate your own configuration metadata file from items annotated with `@ConfigurationProperties` by using the `spring-boot-configuration-processor` jar.
The jar includes a Java annotation processor which is invoked as your project is compiled. The jar includes a Java annotation processor which is invoked as your project is compiled.
To use the processor, include a dependency on `spring-boot-configuration-processor`. To use the processor, include a dependency on `spring-boot-configuration-processor`.
...@@ -812,7 +811,7 @@ You could also let the AspectJ plugin run all the processing and disable annotat ...@@ -812,7 +811,7 @@ You could also let the AspectJ plugin run all the processing and disable annotat
[[configuration-metadata-nested-properties]] [[configuration-metadata-nested-properties]]
==== Nested Properties === Nested Properties
The annotation processor automatically considers inner classes as nested properties. The annotation processor automatically considers inner classes as nested properties.
Consider the following class: Consider the following class:
...@@ -848,7 +847,7 @@ TIP: This has no effect on collections and maps, as those types are automaticall ...@@ -848,7 +847,7 @@ TIP: This has no effect on collections and maps, as those types are automaticall
[[configuration-metadata-additional-metadata]] [[configuration-metadata-additional-metadata]]
==== Adding Additional Metadata === Adding Additional Metadata
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. 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.
You may also need to tune some attributes of an existing key. You may also need to tune some attributes of an existing key.
To support such cases and let you provide custom "hints", the annotation processor automatically merges items from `META-INF/additional-spring-configuration-metadata.json` into the main metadata file. To support such cases and let you provide custom "hints", the annotation processor automatically merges items from `META-INF/additional-spring-configuration-metadata.json` into the main metadata file.
......
[appendix] [appendix]
[[appendix-dependency-versions]] [[dependency-versions]]
== Dependency versions = Dependency versions
include::{asciidoc-sources-root}/attributes.adoc[] include::{asciidoc-sources-root}/attributes.adoc[]
This appendix provides details of the dependencies that are managed by Spring Boot.
[[dependency-versions-coordinates]]
== Managed Dependency Coordinates
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. 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.
When you declare a dependency on one of these artifacts without declaring a version, the version listed in the table is used. When you declare a dependency on one of these artifacts without declaring a version, the version listed in the table is used.
......
[appendix] [appendix]
[[executable-jar]] [[executable-jar]]
== The Executable Jar Format = The Executable Jar Format
include::{asciidoc-sources-root}/attributes.adoc[] include::{asciidoc-sources-root}/attributes.adoc[]
The `spring-boot-loader` modules lets Spring Boot support executable jar and war files. The `spring-boot-loader` modules lets Spring Boot support executable jar and war files.
If you use the Maven plugin or the Gradle plugin, executable jars are automatically generated, and you generally do not need to know the details of how they work. If you use the Maven plugin or the Gradle plugin, executable jars are automatically generated, and you generally do not need to know the details of how they work.
If you need to create executable jars from a different build system or if you are just curious about the underlying technology, this section provides some background. If you need to create executable jars from a different build system or if you are just curious about the underlying technology, this appendix provides some background.
[[executable-jar-nested-jars]] [[executable-jar-nested-jars]]
=== Nested JARs == Nested JARs
Java does not provide any standard way to load nested jar files (that is, jar files that are themselves contained within a jar). Java does not provide any standard way to load nested jar files (that is, jar files that are themselves contained within a jar).
This can be problematic if you need to distribute a self-contained application that can be run from the command line without unpacking. This can be problematic if you need to distribute a self-contained application that can be run from the command line without unpacking.
...@@ -25,7 +24,7 @@ Spring Boot takes a different approach and lets you actually nest jars directly. ...@@ -25,7 +24,7 @@ Spring Boot takes a different approach and lets you actually nest jars directly.
[[executable-jar-jar-file-structure]] [[executable-jar-jar-file-structure]]
==== The Executable Jar File Structure === The Executable Jar File Structure
Spring Boot Loader-compatible jar files should be structured in the following way: Spring Boot Loader-compatible jar files should be structured in the following way:
[indent=0] [indent=0]
...@@ -55,7 +54,7 @@ Dependencies should be placed in a nested `BOOT-INF/lib` directory. ...@@ -55,7 +54,7 @@ Dependencies should be placed in a nested `BOOT-INF/lib` directory.
[[executable-jar-war-file-structure]] [[executable-jar-war-file-structure]]
==== The Executable War File Structure === The Executable War File Structure
Spring Boot Loader-compatible war files should be structured in the following way: Spring Boot Loader-compatible war files should be structured in the following way:
[indent=0] [indent=0]
...@@ -89,7 +88,7 @@ Any dependencies that are required when running embedded but are not required wh ...@@ -89,7 +88,7 @@ Any dependencies that are required when running embedded but are not required wh
[[executable-jar-jarfile]] [[executable-jar-jarfile]]
=== Spring Boot's "`JarFile`" Class == Spring Boot's "`JarFile`" Class
The core class used to support loading nested jars is `org.springframework.boot.loader.jar.JarFile`. The core class used to support loading nested jars is `org.springframework.boot.loader.jar.JarFile`.
It lets you load jar content from a standard jar file or from nested child jar data. It lets you load jar content from a standard jar file or from nested child jar data.
When first loaded, the location of each `JarEntry` is mapped to a physical file offset of the outer jar, as shown in the following example: When first loaded, the location of each `JarEntry` is mapped to a physical file offset of the outer jar, as shown in the following example:
...@@ -116,7 +115,7 @@ We do not need to unpack the archive, and we do not need to read all entry data ...@@ -116,7 +115,7 @@ We do not need to unpack the archive, and we do not need to read all entry data
[[executable-jar-jarfile-compatibility]] [[executable-jar-jarfile-compatibility]]
==== Compatibility with the Standard Java "`JarFile`" === Compatibility with the Standard Java "`JarFile`"
Spring Boot Loader strives to remain compatible with existing code and libraries. Spring Boot Loader strives to remain compatible with existing code and libraries.
`org.springframework.boot.loader.jar.JarFile` extends from `java.util.jar.JarFile` and should work as a drop-in replacement. `org.springframework.boot.loader.jar.JarFile` extends from `java.util.jar.JarFile` and should work as a drop-in replacement.
The `getURL()` method returns a `URL` that opens a connection compatible with `java.net.JarURLConnection` and can be used with Java's `URLClassLoader`. The `getURL()` method returns a `URL` that opens a connection compatible with `java.net.JarURLConnection` and can be used with Java's `URLClassLoader`.
...@@ -124,7 +123,7 @@ The `getURL()` method returns a `URL` that opens a connection compatible with `j ...@@ -124,7 +123,7 @@ The `getURL()` method returns a `URL` that opens a connection compatible with `j
[[executable-jar-launching]] [[executable-jar-launching]]
=== Launching Executable Jars == Launching Executable Jars
The `org.springframework.boot.loader.Launcher` class is a special bootstrap class that is used as an executable jar's main entry point. The `org.springframework.boot.loader.Launcher` class is a special bootstrap class that is used as an executable jar's main entry point.
It is the actual `Main-Class` in your jar file, and it is used to setup an appropriate `URLClassLoader` and ultimately call your `main()` method. It is the actual `Main-Class` in your jar file, and it is used to setup an appropriate `URLClassLoader` and ultimately call your `main()` method.
...@@ -139,7 +138,7 @@ You can add additional locations by setting an environment variable called `LOAD ...@@ -139,7 +138,7 @@ You can add additional locations by setting an environment variable called `LOAD
[[executable-jar-launcher-manifest]] [[executable-jar-launcher-manifest]]
==== Launcher Manifest === Launcher Manifest
You need to specify an appropriate `Launcher` as the `Main-Class` attribute of `META-INF/MANIFEST.MF`. You need to specify an appropriate `Launcher` as the `Main-Class` attribute of `META-INF/MANIFEST.MF`.
The actual class that you want to launch (that is, the class that contains a `main` method) should be specified in the `Start-Class` attribute. The actual class that you want to launch (that is, the class that contains a `main` method) should be specified in the `Start-Class` attribute.
...@@ -165,7 +164,7 @@ The classpath is deduced from the nested jars. ...@@ -165,7 +164,7 @@ The classpath is deduced from the nested jars.
[[executable-jar-exploded-archives]] [[executable-jar-exploded-archives]]
==== Exploded Archives === Exploded Archives
Certain PaaS implementations may choose to unpack archives before they run. Certain PaaS implementations may choose to unpack archives before they run.
For example, Cloud Foundry operates this way. For example, Cloud Foundry operates this way.
You can run an unpacked archive by starting the appropriate launcher, as follows: You can run an unpacked archive by starting the appropriate launcher, as follows:
...@@ -179,7 +178,7 @@ You can run an unpacked archive by starting the appropriate launcher, as follows ...@@ -179,7 +178,7 @@ You can run an unpacked archive by starting the appropriate launcher, as follows
[[executable-jar-property-launcher-features]] [[executable-jar-property-launcher-features]]
=== `PropertiesLauncher` Features == `PropertiesLauncher` Features
`PropertiesLauncher` has a few special features that can be enabled with external properties (System properties, environment variables, manifest entries, or `loader.properties`). `PropertiesLauncher` has a few special features that can be enabled with external properties (System properties, environment variables, manifest entries, or `loader.properties`).
The following table describes these properties: The following table describes these properties:
...@@ -263,7 +262,7 @@ The following rules apply to working with `PropertiesLauncher`: ...@@ -263,7 +262,7 @@ The following rules apply to working with `PropertiesLauncher`:
[[executable-jar-restrictions]] [[executable-jar-restrictions]]
=== Executable Jar Restrictions == Executable Jar Restrictions
You need to consider the following restrictions when working with a Spring Boot Loader packaged application: You need to consider the following restrictions when working with a Spring Boot Loader packaged application:
...@@ -286,7 +285,7 @@ For this reason, you should consider a different logging implementation. ...@@ -286,7 +285,7 @@ For this reason, you should consider a different logging implementation.
[[executable-jar-alternatives]] [[executable-jar-alternatives]]
=== Alternative Single Jar Solutions == Alternative Single Jar Solutions
If the preceding restrictions mean that you cannot use Spring Boot Loader, consider the following alternatives: If the preceding restrictions mean that you cannot use Spring Boot Loader, consider the following alternatives:
* https://maven.apache.org/plugins/maven-shade-plugin/[Maven Shade Plugin] * https://maven.apache.org/plugins/maven-shade-plugin/[Maven Shade Plugin]
......
[appendix] [appendix]
[[test-auto-configuration]] [[test-auto-configuration]]
== Test Auto-configuration Annotations = Test Auto-configuration Annotations
include::{asciidoc-sources-root}/attributes.adoc[] include::{asciidoc-sources-root}/attributes.adoc[]
This appendix describes the `@…Test` auto-configuration annotations that Spring Boot provides to test slices of your application.
[[test-auto-configuration-slices]]
== Test Slices
The following table lists the various `@…Test` annotations that can be used to test slices of your application and the auto-configuration that they import by default: The following table lists the various `@…Test` annotations that can be used to test slices of your application and the auto-configuration that they import by default:
include::{generated-resources-root}/test-slice-auto-configuration.adoc[] include::{generated-resources-root}/test-slice-auto-configuration.adoc[]
[[appendix]]
= Appendices
include::attributes.adoc[]
include::appendix/application-properties.adoc[]
include::appendix/configuration-metadata.adoc[]
include::appendix/auto-configuration-classes.adoc[]
include::appendix/test-auto-configuration.adoc[]
include::appendix/executable-jar-format.adoc[]
include::appendix/dependency-versions.adoc[]
...@@ -323,7 +323,7 @@ This section contains three examples of using `findmainclass`. ...@@ -323,7 +323,7 @@ This section contains three examples of using `findmainclass`.
[[build-tool-plugins-other-build-systems]] [[build-tool-plugins-other-build-systems]]
== Supporting Other Build Systems == Supporting Other Build Systems
If you want to use a build tool other than Maven, Gradle, or Ant, you likely need to develop your own plugin. If you want to use a build tool other than Maven, Gradle, or Ant, you likely need to develop your own plugin.
Executable jars need to follow a specific format and certain entries need to be written in an uncompressed form (see the "`<<appendix.adoc#executable-jar, executable jar format>>`" section in the appendix for details). Executable jars need to follow a specific format and certain entries need to be written in an uncompressed form (see the "`<<appendix-executable-jar-format.adoc#executable-jar, executable jar format>>`" section in the appendix for details).
The Spring Boot Maven and Gradle plugins both make use of `spring-boot-loader-tools` to actually generate jars. The Spring Boot Maven and Gradle plugins both make use of `spring-boot-loader-tools` to actually generate jars.
If you need to, you may use this library directly. If you need to, you may use this library directly.
...@@ -377,6 +377,6 @@ The following example shows a typical repackage implementation: ...@@ -377,6 +377,6 @@ The following example shows a typical repackage implementation:
[[build-tool-plugins-whats-next]] [[build-tool-plugins-whats-next]]
== What to Read Next == What to Read Next
If you are interested in how the build tool plugins work, you can look at the {spring-boot-code}/spring-boot-project/spring-boot-tools[`spring-boot-tools`] module on GitHub. If you are interested in how the build tool plugins work, you can look at the {spring-boot-code}/spring-boot-project/spring-boot-tools[`spring-boot-tools`] module on GitHub.
More technical details of the executable jar format are covered in <<appendix.adoc#executable-jar,the appendix>>. More technical details of the executable jar format are covered in <<appendix-executable-jar-format#executable-jar,the appendix>>.
If you have specific build-related questions, you can check out the "`<<howto.adoc#howto, how-to>>`" guides. If you have specific build-related questions, you can check out the "`<<howto.adoc#howto, how-to>>`" guides.
...@@ -88,4 +88,4 @@ Finally, we have a few topics for more advanced users: ...@@ -88,4 +88,4 @@ Finally, we have a few topics for more advanced users:
* *Spring Boot Applications Deployment:* <<deployment.adoc#cloud-deployment, Cloud Deployment>> | <<deployment.adoc#deployment-service, OS Service>> * *Spring Boot Applications Deployment:* <<deployment.adoc#cloud-deployment, Cloud Deployment>> | <<deployment.adoc#deployment-service, OS Service>>
* *Build tool plugins:* <<build-tool-plugins.adoc#build-tool-plugins-maven-plugin, Maven>> | <<build-tool-plugins.adoc#build-tool-plugins-gradle-plugin, Gradle>> * *Build tool plugins:* <<build-tool-plugins.adoc#build-tool-plugins-maven-plugin, Maven>> | <<build-tool-plugins.adoc#build-tool-plugins-gradle-plugin, Gradle>>
* *Appendix:* <<appendix.adoc#common-application-properties, Application Properties>> | <<appendix.adoc#auto-configuration-classes, Auto-configuration classes>> | <<appendix.adoc#executable-jar, Executable Jars>> * *Appendix:* <<appendix-application-properties.adoc#common-application-properties,Application Properties>> | <<appendix-configuration-metadata.adoc#configuration-metadata,Configuration Metadata>> | <<appendix-auto-configuration-classes.adoc#auto-configuration-classes,Auto-configuration Classes>> | <<appendix-test-auto-configuration.adoc#test-auto-configuration,Test Auto-configuration Annotations>> | <<appendix-executable-jar-format.adoc#executable-jar,Executable Jars>> | <<appendix-dependency-versions.adoc#appendex-dependency-versions,Dependency Versions>>
...@@ -658,7 +658,7 @@ An uber jar packages all the classes from all the application's dependencies int ...@@ -658,7 +658,7 @@ An uber jar packages all the classes from all the application's dependencies int
The problem with this approach is that it becomes hard to see which libraries are in your application. The problem with this approach is that it becomes hard to see which libraries are in your application.
It can also be problematic if the same filename is used (but with different content) in multiple jars. It can also be problematic if the same filename is used (but with different content) in multiple jars.
Spring Boot takes a <<appendix.adoc#executable-jar, different approach>> and lets you actually nest jars directly. Spring Boot takes a <<appendix-executable-jar-format.adoc#executable-jar, different approach>> and lets you actually nest jars directly.
**** ****
To create an executable jar, we need to add the `spring-boot-maven-plugin` to our `pom.xml`. To create an executable jar, we need to add the `spring-boot-maven-plugin` to our `pom.xml`.
......
...@@ -397,7 +397,7 @@ There is not (and technically cannot be) an exhaustive list of all supported pro ...@@ -397,7 +397,7 @@ There is not (and technically cannot be) an exhaustive list of all supported pro
A running application with the Actuator features has a `configprops` endpoint that shows all the bound and bindable properties available through `@ConfigurationProperties`. A running application with the Actuator features has a `configprops` endpoint that shows all the bound and bindable properties available through `@ConfigurationProperties`.
The appendix includes an <<appendix.adoc#common-application-properties, `application.properties`>> example with a list of the most common properties supported by Spring Boot. The appendix includes an <<application-properties.adoc#common-application-properties, `application.properties`>> example with a list of the most common properties supported by Spring Boot.
The definitive list comes from searching the source code for `@ConfigurationProperties` and `@Value` annotations as well as the occasional use of `Binder`. The definitive list comes from searching the source code for `@ConfigurationProperties` and `@Value` annotations as well as the occasional use of `Binder`.
For more about the exact ordering of loading properties, see "<<spring-boot-features#boot-features-external-config>>". For more about the exact ordering of loading properties, see "<<spring-boot-features#boot-features-external-config>>".
...@@ -2435,7 +2435,7 @@ If your application contains classes that you want to share with other projects, ...@@ -2435,7 +2435,7 @@ If your application contains classes that you want to share with other projects,
The separate module can then be depended upon by your application and other projects. The separate module can then be depended upon by your application and other projects.
If you cannot rearrange your code as recommended above, Spring Boot's Maven and Gradle plugins must be configured to produce a separate artifact that is suitable for use as a dependency. If you cannot rearrange your code as recommended above, Spring Boot's Maven and Gradle plugins must be configured to produce a separate artifact that is suitable for use as a dependency.
The executable archive cannot be used as a dependency as the <<appendix.adoc#executable-jar-jar-file-structure,executable jar format>> packages application classes in `BOOT-INF/classes`. The executable archive cannot be used as a dependency as the <<appendix-executable-jar-format.adoc#executable-jar-jar-file-structure,executable jar format>> packages application classes in `BOOT-INF/classes`.
This means that they cannot be found when the executable jar is used as a dependency. This means that they cannot be found when the executable jar is used as a dependency.
To produce the two artifacts, one that can be used as a dependency and one that is executable, a classifier must be specified. To produce the two artifacts, one that can be used as a dependency and one that is executable, a classifier must be specified.
......
...@@ -16,4 +16,13 @@ The reference documentation consists of the following sections: ...@@ -16,4 +16,13 @@ The reference documentation consists of the following sections:
<<spring-boot-cli.adoc#cli,Spring Boot CLI>> :: Installing the CLI, Using the CLI, Configuring the CLI, and more. <<spring-boot-cli.adoc#cli,Spring Boot CLI>> :: Installing the CLI, Using the CLI, Configuring the CLI, and more.
<<build-tool-plugins.adoc#build-tool-plugins,Build Tool Plugins>> :: Maven Plugin, Gradle Plugin, Antlib, and more. <<build-tool-plugins.adoc#build-tool-plugins,Build Tool Plugins>> :: Maven Plugin, Gradle Plugin, Antlib, and more.
<<howto.adoc#howto,"`How-to`" Guides>> :: Application Development, Configuration, Embedded Servers, Data Access, and many more. <<howto.adoc#howto,"`How-to`" Guides>> :: Application Development, Configuration, Embedded Servers, Data Access, and many more.
<<appendix.adoc#appendix,Appendices>> :: Properties, Metadata, Configuration, Dependencies, and more.
The reference documentation has the following appendices:
[horizontal]
<<appendix-application-properties.adoc#common-application-properties,Application Properties>> :: Common application properties that can be used to configure your application.
<<appendix-configuration-metadata.adoc#configuration-metadata,Configuration Metadata>> :: Metadata used to describe configuration properties.
<<appendix-auto-configuration-classes.adoc#auto-configuration-classes,Auto-configuration Classes>> :: Auto-configuration classes provided by Spring Boot.
<<appendix-test-auto-configuration.adoc#test-auto-configuration,Test Auto-configuration Annotations>> :: Test-autoconfiguration annotations used to test slices of your application.
<<appendix-executable-jar-format.adoc#executable-jar,Executable Jars>> :: Spring Boot's executable jars, their launchers, and their format.
<<appendix-dependency-versions.adoc#appendex-dependency-versions,Dependency Versions>> :: Details of the dependencies that are managed by Spring Boot.
...@@ -14,4 +14,15 @@ include::deployment.adoc[leveloffset=+1] ...@@ -14,4 +14,15 @@ include::deployment.adoc[leveloffset=+1]
include::spring-boot-cli.adoc[leveloffset=+1] include::spring-boot-cli.adoc[leveloffset=+1]
include::build-tool-plugins.adoc[leveloffset=+1] include::build-tool-plugins.adoc[leveloffset=+1]
include::howto.adoc[leveloffset=+1] include::howto.adoc[leveloffset=+1]
include::appendix.adoc[leveloffset=+1]
[[appendix]]
== Appendices
include::appendix-application-properties.adoc[leveloffset=+2]
include::appendix-configuration-metadata.adoc[leveloffset=+2]
include::appendix-auto-configuration-classes.adoc[leveloffset=+2]
include::appendix-test-auto-configuration.adoc[leveloffset=+2]
include::appendix-executable-jar-format.adoc[leveloffset=+2]
include::appendix-dependency-versions.adoc[leveloffset=+2]
...@@ -171,7 +171,7 @@ Doing so consults Spring Boot's default dependency metadata to deduce the artifa ...@@ -171,7 +171,7 @@ Doing so consults Spring Boot's default dependency metadata to deduce the artifa
NOTE: The default metadata is tied to the version of the CLI that you use. NOTE: The default metadata is tied to the version of the CLI that you use.
It changes only when you move to a new version of the CLI, putting you in control of when the versions of your dependencies may change. It changes only when you move to a new version of the CLI, putting you in control of when the versions of your dependencies may change.
A table showing the dependencies and their versions that are included in the default metadata can be found in the <<appendix.adoc#appendix-dependency-versions,appendix>>. A table showing the dependencies and their versions that are included in the default metadata can be found in the <<appendix-dependency-versions.adoc#appendix-dependency-versions,appendix>>.
......
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