mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Validate section IDs in the reference documentation
See gh-26307
This commit is contained in:
parent
5a3c354e6c
commit
5d8a64e186
@ -44,6 +44,7 @@ dependencies {
|
||||
actuatorApiDocumentation(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "documentation"))
|
||||
|
||||
asciidoctorExtensions("io.spring.asciidoctor:spring-asciidoctor-extensions-spring-boot")
|
||||
asciidoctorExtensions("io.spring.asciidoctor:spring-asciidoctor-extensions-section-ids")
|
||||
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-autoconfigure"))
|
||||
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-devtools"))
|
||||
|
@ -125,11 +125,11 @@ getting-started.installing.cli.completion
|
||||
|
||||
# 4 ==== Windows Scoop Installation
|
||||
getting-started-scoop-cli-installation=\
|
||||
getting-started.installing.scoop
|
||||
getting-started.installing.cli.scoop
|
||||
|
||||
# 4 ==== Quick-start Spring CLI Example
|
||||
getting-started-cli-example=\
|
||||
getting-started.installing.quick-start
|
||||
getting-started.installing.cli.quick-start
|
||||
|
||||
# 3 === Upgrading from an Earlier Version of Spring Boot
|
||||
getting-started-upgrading-from-an-earlier-version=\
|
||||
@ -913,7 +913,7 @@ features.sql.datasource.connection-pool
|
||||
|
||||
# 4 ==== Connection to a JNDI DataSource
|
||||
boot-features-connecting-to-a-jndi-datasource=\
|
||||
features.sql.configure-datasource.jndi
|
||||
features.sql.datasource.jndi
|
||||
|
||||
# 3 === Using JdbcTemplate
|
||||
boot-features-using-jdbc-template=\
|
||||
@ -1612,7 +1612,7 @@ features.container-images.building.dockerfiles
|
||||
|
||||
# 4 ==== Cloud Native Buildpacks
|
||||
boot-features-container-images-buildpacks=\
|
||||
features.container-images.images.buildpacks
|
||||
features.container-images.building.buildpacks
|
||||
|
||||
# 2 == What to Read Next
|
||||
boot-features-whats-next=\
|
||||
@ -2507,7 +2507,7 @@ howto.spring-mvc.customize-jackson-objectmapper
|
||||
|
||||
# 3 === Customize the @ResponseBody Rendering
|
||||
howto-customize-the-responsebody-rendering=\
|
||||
howtospring-mvc.customize-responsebody-rendering
|
||||
howto.spring-mvc.customize-responsebody-rendering
|
||||
|
||||
# 3 === Handling Multipart File Uploads
|
||||
howto-multipart-file-upload-configuration=\
|
||||
@ -2833,275 +2833,275 @@ howto.traditional-deployment
|
||||
|
||||
# 3 === Create a Deployable War File
|
||||
howto-create-a-deployable-war-file=\
|
||||
howto.howto.traditional-deployment.war
|
||||
howto.traditional-deployment.war
|
||||
|
||||
# 3 === Convert an Existing Application to Spring Boot
|
||||
howto-convert-an-existing-application-to-spring-boot=\
|
||||
howto.howto.traditional-deployment.convert-existing-application
|
||||
howto.traditional-deployment.convert-existing-application
|
||||
|
||||
# 3 === Deploying a WAR to WebLogic
|
||||
howto-weblogic=\
|
||||
howto.howto.traditional-deployment.weblogic
|
||||
howto.traditional-deployment.weblogic
|
||||
|
||||
# 3 === Use Jedis Instead of Lettuce
|
||||
# 2 == Use Jedis Instead of Lettuce
|
||||
howto-use-jedis-instead-of-lettuce=\
|
||||
howto.howto.traditional-deployment.jedis-instead-of-lettuce
|
||||
howto.jedis-instead-of-lettuce
|
||||
|
||||
# 3 === Use Testcontainers for integration testing
|
||||
# 2 == Use Testcontainers for integration testing
|
||||
howto-testcontainers=\
|
||||
howto.howto.traditional-deployment.testcontainers
|
||||
howto.testcontainers
|
||||
|
||||
|
||||
|
||||
# (appendix-application-properties.adoc)
|
||||
# 1 = Common Application properties
|
||||
common-application-properties=\
|
||||
common-application-properties
|
||||
appendix.common-application-properties
|
||||
|
||||
# 2 == Core Properties [[core-properties]]
|
||||
common-application-properties-core=\
|
||||
common-application-properties.core
|
||||
appendix.common-application-properties.core
|
||||
|
||||
# 2 == Cache Properties [[cache-properties]]
|
||||
common-application-properties-cache=\
|
||||
common-application-properties.cache
|
||||
appendix.common-application-properties.cache
|
||||
|
||||
# 2 == Mail Properties [[mail-properties]]
|
||||
common-application-properties-mail=\
|
||||
common-application-properties.mail
|
||||
appendix.common-application-properties.mail
|
||||
|
||||
# 2 == JSON Properties [[json-properties]]
|
||||
common-application-properties-json=\
|
||||
common-application-properties.json
|
||||
appendix.common-application-properties.json
|
||||
|
||||
# 2 == Data Properties [[data-properties]]
|
||||
common-application-properties-data=\
|
||||
common-application-properties.data
|
||||
appendix.common-application-properties.data
|
||||
|
||||
# 2 == Transaction Properties [[transaction-properties]]
|
||||
common-application-properties-transaction=\
|
||||
common-application-properties.transaction
|
||||
appendix.common-application-properties.transaction
|
||||
|
||||
# 2 == Data Migration Properties [[data-migration-properties]]
|
||||
common-application-properties-data-migration=\
|
||||
common-application-properties.data-migration
|
||||
appendix.common-application-properties.data-migration
|
||||
|
||||
# 2 == Integration Properties [[integration-properties]]
|
||||
common-application-properties-integration=\
|
||||
common-application-properties.integration
|
||||
appendix.common-application-properties.integration
|
||||
|
||||
# 2 == Web Properties [[web-properties]]
|
||||
common-application-properties-web=\
|
||||
common-application-properties.web
|
||||
appendix.common-application-properties.web
|
||||
|
||||
# 2 == Templating Properties [[templating-properties]]
|
||||
common-application-properties-templating=\
|
||||
common-application-properties.templating
|
||||
appendix.common-application-properties.templating
|
||||
|
||||
# 2 == Server Properties [[server-properties]]
|
||||
common-application-properties-server=\
|
||||
common-application-properties.server
|
||||
appendix.common-application-properties.server
|
||||
|
||||
# 2 == Security Properties [[security-properties]]
|
||||
common-application-properties-security=\
|
||||
common-application-properties.security
|
||||
appendix.common-application-properties.security
|
||||
|
||||
# 2 == RSocket Properties [[rsocket-properties]]
|
||||
common-application-properties-rsocket=\
|
||||
common-application-properties.rsocket
|
||||
appendix.common-application-properties.rsocket
|
||||
|
||||
# 2 == Actuator Properties [[actuator-properties]]
|
||||
common-application-properties-actuator=\
|
||||
common-application-properties.actuator
|
||||
appendix.common-application-properties.actuator
|
||||
|
||||
# 2 == Devtools Properties [[devtools-properties]]
|
||||
common-application-properties-devtools=\
|
||||
common-application-properties.devtools
|
||||
appendix.common-application-properties.devtools
|
||||
|
||||
# 2 == Testing Properties [[testing-properties]]
|
||||
common-application-properties-testing=\
|
||||
common-application-properties.testing
|
||||
appendix.common-application-properties.testing
|
||||
|
||||
|
||||
|
||||
# (configuration-metadata.adoc)
|
||||
# 1 = Configuration Metadata
|
||||
configuration-metadata=\
|
||||
configuration-metadata
|
||||
appendix.configuration-metadata
|
||||
|
||||
# 2 == Metadata Format
|
||||
configuration-metadata-format=\
|
||||
configuration-metadata.format
|
||||
appendix.configuration-metadata.format
|
||||
|
||||
# 3 === Group Attributes
|
||||
configuration-metadata-group-attributes=\
|
||||
configuration-metadata.format.group
|
||||
appendix.configuration-metadata.format.group
|
||||
|
||||
# 3 === Property Attributes
|
||||
configuration-metadata-property-attributes=\
|
||||
configuration-metadata.format.property
|
||||
appendix.configuration-metadata.format.property
|
||||
|
||||
# 3 === Hint Attributes
|
||||
configuration-metadata-hints-attributes=\
|
||||
configuration-metadata.format.hints
|
||||
appendix.configuration-metadata.format.hints
|
||||
|
||||
# 3 === Repeated Metadata Items
|
||||
configuration-metadata-repeated-items=\
|
||||
configuration-metadata.format.repeated-items
|
||||
appendix.configuration-metadata.format.repeated-items
|
||||
|
||||
# 2 == Providing Manual Hints
|
||||
configuration-metadata-providing-manual-hints=\
|
||||
configuration-metadata.manual-hints
|
||||
appendix.configuration-metadata.manual-hints
|
||||
|
||||
# 3 === Value Hint
|
||||
configuration-metadata-providing-manual-hints-value-hint=\
|
||||
configuration-metadata.manual-hints.value-hint
|
||||
appendix.configuration-metadata.manual-hints.value-hint
|
||||
|
||||
# 3 === Value Providers
|
||||
configuration-metadata-providing-manual-hints-value-providers=\
|
||||
configuration-metadata.manual-hints.value-providers
|
||||
appendix.configuration-metadata.manual-hints.value-providers
|
||||
|
||||
# 4 ==== Any
|
||||
configuration-metadata-providing-manual-hints-any=\
|
||||
configuration-metadata.manual-hints.value-providers.any
|
||||
appendix.configuration-metadata.manual-hints.value-providers.any
|
||||
|
||||
# 4 ==== Class Reference
|
||||
configuration-metadata-providing-manual-hints-class-reference=\
|
||||
configuration-metadata.manual-hints.value-providers.class-reference
|
||||
appendix.configuration-metadata.manual-hints.value-providers.class-reference
|
||||
|
||||
# 4 ==== Handle As
|
||||
configuration-metadata-providing-manual-hints-handle-as=\
|
||||
configuration-metadata.manual-hints.value-providers.handle-as
|
||||
appendix.configuration-metadata.manual-hints.value-providers.handle-as
|
||||
|
||||
# 4 ==== Logger Name
|
||||
configuration-metadata-providing-manual-hints-logger-name=\
|
||||
configuration-metadata.manual-hints.value-providers.logger-name
|
||||
appendix.configuration-metadata.manual-hints.value-providers.logger-name
|
||||
|
||||
# 4 ==== Spring Bean Reference
|
||||
configuration-metadata-providing-manual-hints-spring-bean-reference=\
|
||||
configuration-metadata.manual-hints.value-providers.spring-bean-reference
|
||||
appendix.configuration-metadata.manual-hints.value-providers.spring-bean-reference
|
||||
|
||||
# 4 ==== Spring Profile Name
|
||||
configuration-metadata-providing-manual-hints-spring-profile-name=\
|
||||
configuration-metadata.manual-hints.value-providers.spring-profile-name
|
||||
appendix.configuration-metadata.manual-hints.value-providers.spring-profile-name
|
||||
|
||||
# 2 == Generating Your Own Metadata by Using the Annotation Processor
|
||||
configuration-metadata-annotation-processor=\
|
||||
configuration-metadata.annotation-processor
|
||||
appendix.configuration-metadata.annotation-processor
|
||||
|
||||
# 3 === Configuring the Annotation Processor
|
||||
configuration-metadata-annotation-processor-setup=\
|
||||
configuration-metadata.annotation-processor.configuring
|
||||
appendix.configuration-metadata.annotation-processor.configuring
|
||||
|
||||
# 3 === Automatic Metadata Generation
|
||||
configuration-metadata-annotation-processor-metadata-generation=\
|
||||
configuration-metadata.annotation-processor.automatic-metadata-generation
|
||||
appendix.configuration-metadata.annotation-processor.automatic-metadata-generation
|
||||
|
||||
# 4 ==== Nested Properties
|
||||
configuration-metadata-annotation-processor-metadata-generation-nested=\
|
||||
configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties
|
||||
appendix.configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties
|
||||
|
||||
# 3 === Adding Additional Metadata
|
||||
configuration-metadata-additional-metadata=\
|
||||
configuration-metadata.annotation-processor.adding-additional-metadata
|
||||
appendix.configuration-metadata.annotation-processor.adding-additional-metadata
|
||||
|
||||
|
||||
|
||||
# (auto-configuration-classes.adoc)
|
||||
# 1 = Auto-configuration Classes
|
||||
auto-configuration-classes=\
|
||||
auto-configuration-classes
|
||||
appendix.auto-configuration-classes
|
||||
|
||||
# 2 == spring-boot-autoconfigure
|
||||
auto-configuration-classes-from-autoconfigure-module=\
|
||||
auto-configuration-classes.core
|
||||
appendix.auto-configuration-classes.core
|
||||
|
||||
# 2 == spring-boot-actuator-autoconfigure
|
||||
auto-configuration-classes-from-actuator=\
|
||||
auto-configuration-classes.actuator
|
||||
appendix.auto-configuration-classes.actuator
|
||||
|
||||
|
||||
|
||||
# (test-auto-configuration.adoc)
|
||||
# 1 = Test Auto-configuration Annotations
|
||||
test-auto-configuration=\
|
||||
test-auto-configuration
|
||||
appendix.test-auto-configuration
|
||||
|
||||
# 2 == Test Slices
|
||||
test-auto-configuration-slices=\
|
||||
test-auto-configuration.slices
|
||||
appendix.test-auto-configuration.slices
|
||||
|
||||
|
||||
|
||||
# (executable-jar.adoc)
|
||||
# 1 = The Executable Jar Format
|
||||
executable-jar=\
|
||||
executable-jar
|
||||
appendix.executable-jar
|
||||
|
||||
# 2 == Nested JARs
|
||||
executable-jar-nested-jars=\
|
||||
executable-jar.nested-jars
|
||||
appendix.executable-jar.nested-jars
|
||||
|
||||
# 3 === The Executable Jar File Structure
|
||||
executable-jar-jar-file-structure=\
|
||||
executable-jar.nested-jars.jar-structure
|
||||
appendix.executable-jar.nested-jars.jar-structure
|
||||
|
||||
# 3 === The Executable War File Structure
|
||||
executable-jar-war-file-structure=\
|
||||
executable-jar.nested-jars.war-structure
|
||||
appendix.executable-jar.nested-jars.war-structure
|
||||
|
||||
# 3 === Index Files
|
||||
executable-jar-war-index-files=\
|
||||
executable-jar.nested-jars.index-files
|
||||
appendix.executable-jar.nested-jars.index-files
|
||||
|
||||
# 3 === Classpath Index
|
||||
executable-jar-war-index-files-classpath=\
|
||||
executable-jar.nested-jars.classpath-index
|
||||
appendix.executable-jar.nested-jars.classpath-index
|
||||
|
||||
# 3 === Layer Index
|
||||
executable-jar-war-index-files-layers=\
|
||||
executable-jar.nested-jars.layer-index
|
||||
appendix.executable-jar.nested-jars.layer-index
|
||||
|
||||
# 2 == Spring Boot's "`JarFile`" Class
|
||||
executable-jar-jarfile=\
|
||||
executable-jar.jarfile-class
|
||||
appendix.executable-jar.jarfile-class
|
||||
|
||||
# 3 === Compatibility with the Standard Java "`JarFile`"
|
||||
executable-jar-jarfile-compatibility=\
|
||||
executable-jar.jarfile-class.compatibilty
|
||||
appendix.executable-jar.jarfile-class.compatibilty
|
||||
|
||||
# 2 == Launching Executable Jars
|
||||
executable-jar-launching=\
|
||||
executable-jar.launching
|
||||
appendix.executable-jar.launching
|
||||
|
||||
# 3 === Launcher Manifest
|
||||
executable-jar-launcher-manifest=\
|
||||
executable-jar.launching.manifest
|
||||
appendix.executable-jar.launching.manifest
|
||||
|
||||
# 2 == PropertiesLauncher Features
|
||||
executable-jar-property-launcher-features=\
|
||||
executable-jar.property-launcher
|
||||
appendix.executable-jar.property-launcher
|
||||
|
||||
# 2 == Executable Jar Restrictions
|
||||
executable-jar-restrictions=\
|
||||
executable-jar.restrictions
|
||||
appendix.executable-jar.restrictions
|
||||
|
||||
# 2 == Alternative Single Jar Solutions
|
||||
executable-jar-alternatives=\
|
||||
executable-jar.alternatives
|
||||
appendix.executable-jar.alternatives
|
||||
|
||||
|
||||
|
||||
# (dependency-versions.adoc)
|
||||
# 1 = Dependency versions
|
||||
dependency-versions=\
|
||||
dependency-versions
|
||||
appendix.dependency-versions
|
||||
|
||||
# 2 == Managed Dependency Coordinates
|
||||
dependency-versions-coordinates=\
|
||||
dependency-versions.coordinates
|
||||
appendix.dependency-versions.coordinates
|
||||
|
||||
# 2 == Version Properties
|
||||
dependency-versions-properties=\
|
||||
dependency-versions.properties
|
||||
appendix.dependency-versions.properties
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
[appendix]
|
||||
[[auto-configuration-classes]]
|
||||
[[appendix.auto-configuration-classes]]
|
||||
= Auto-configuration Classes
|
||||
include::attributes.adoc[]
|
||||
|
||||
@ -9,7 +9,7 @@ Remember to also look at the conditions report in your application for more deta
|
||||
|
||||
|
||||
|
||||
[[auto-configuration-classes.core]]
|
||||
[[appendix.auto-configuration-classes.core]]
|
||||
== spring-boot-autoconfigure
|
||||
The following auto-configuration classes are from the `spring-boot-autoconfigure` module:
|
||||
|
||||
@ -17,7 +17,7 @@ include::auto-configuration-classes/spring-boot-autoconfigure.adoc[]
|
||||
|
||||
|
||||
|
||||
[[auto-configuration-classes.actuator]]
|
||||
[[appendix.auto-configuration-classes.actuator]]
|
||||
== spring-boot-actuator-autoconfigure
|
||||
The following auto-configuration classes are from the `spring-boot-actuator-autoconfigure` module:
|
||||
|
||||
|
@ -186,7 +186,7 @@ This section contains three examples of using `findmainclass`.
|
||||
[[build-tool-plugins.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.
|
||||
Executable jars need to follow a specific format and certain entries need to be written in an uncompressed form (see the "`<<executable-jar.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 "`<<executable-jar.adoc#appendix.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.
|
||||
If you need to, you may use this library directly.
|
||||
@ -240,6 +240,6 @@ The following example shows a typical repackage implementation:
|
||||
[[build-tool-plugins.whats-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.
|
||||
More technical details of the executable jar format are covered in <<appendix-executable-jar-format#executable-jar,the appendix>>.
|
||||
More technical details of the executable jar format are covered in <<appendix-executable-jar-format#appendix.executable-jar,the appendix>>.
|
||||
|
||||
If you have specific build-related questions, you can check out the "`<<howto.adoc#howto, how-to>>`" guides.
|
||||
|
@ -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.
|
||||
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 <<dependency-versions.adoc#dependency-versions,appendix>>.
|
||||
A table showing the dependencies and their versions that are included in the default metadata can be found in the <<dependency-versions.adoc#appendix.dependency-versions,appendix>>.
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
:numbered!:
|
||||
[appendix]
|
||||
[[common-application-properties]]
|
||||
[[appendix.common-application-properties]]
|
||||
= Common Application properties
|
||||
include::attributes.adoc[]
|
||||
|
||||
@ -14,96 +14,96 @@ Also, you can define your own properties.
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.core]]
|
||||
[[appendix.common-application-properties.core]]
|
||||
== Core Properties [[core-properties]]
|
||||
include::config-docs/core.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.cache]]
|
||||
[[appendix.common-application-properties.cache]]
|
||||
== Cache Properties [[cache-properties]]
|
||||
include::config-docs/cache.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.mail]]
|
||||
[[appendix.common-application-properties.mail]]
|
||||
== Mail Properties [[mail-properties]]
|
||||
include::config-docs/mail.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.json]]
|
||||
[[appendix.common-application-properties.json]]
|
||||
== JSON Properties [[json-properties]]
|
||||
include::config-docs/json.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.data]]
|
||||
[[appendix.common-application-properties.data]]
|
||||
== Data Properties [[data-properties]]
|
||||
include::config-docs/data.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.transaction]]
|
||||
[[appendix.common-application-properties.transaction]]
|
||||
== Transaction Properties [[transaction-properties]]
|
||||
include::config-docs/transaction.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.data-migration]]
|
||||
[[appendix.common-application-properties.data-migration]]
|
||||
== Data Migration Properties [[data-migration-properties]]
|
||||
include::config-docs/data-migration.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.integration]]
|
||||
[[appendix.common-application-properties.integration]]
|
||||
== Integration Properties [[integration-properties]]
|
||||
include::config-docs/integration.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.web]]
|
||||
[[appendix.common-application-properties.web]]
|
||||
== Web Properties [[web-properties]]
|
||||
include::config-docs/web.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.templating]]
|
||||
[[appendix.common-application-properties.templating]]
|
||||
== Templating Properties [[templating-properties]]
|
||||
include::config-docs/templating.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.server]]
|
||||
[[appendix.common-application-properties.server]]
|
||||
== Server Properties [[server-properties]]
|
||||
include::config-docs/server.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.security]]
|
||||
[[appendix.common-application-properties.security]]
|
||||
== Security Properties [[security-properties]]
|
||||
include::config-docs/security.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.rsocket]]
|
||||
[[appendix.common-application-properties.rsocket]]
|
||||
== RSocket Properties [[rsocket-properties]]
|
||||
include::config-docs/rsocket.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.actuator]]
|
||||
[[appendix.common-application-properties.actuator]]
|
||||
== Actuator Properties [[actuator-properties]]
|
||||
include::config-docs/actuator.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.devtools]]
|
||||
[[appendix.common-application-properties.devtools]]
|
||||
== Devtools Properties [[devtools-properties]]
|
||||
include::config-docs/devtools.adoc[]
|
||||
|
||||
|
||||
|
||||
[[common-application-properties.testing]]
|
||||
[[appendix.common-application-properties.testing]]
|
||||
== Testing Properties [[testing-properties]]
|
||||
include::config-docs/testing.adoc[]
|
||||
|
@ -1,5 +1,5 @@
|
||||
[appendix]
|
||||
[[configuration-metadata]]
|
||||
[[appendix.configuration-metadata]]
|
||||
= Configuration Metadata
|
||||
include::attributes.adoc[]
|
||||
|
||||
@ -7,11 +7,11 @@ Spring Boot jars include metadata files that provide details of all supported co
|
||||
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.
|
||||
|
||||
The majority of the metadata file is generated automatically at compile time by processing all items annotated with `@ConfigurationProperties`.
|
||||
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.
|
||||
However, it is possible to <<appendix.configuration-metadata.annotation-processor.adding-additional-metadata,write part of the metadata manually>> for corner cases or more advanced use cases.
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.format]]
|
||||
[[appendix.configuration-metadata.format]]
|
||||
== Metadata Format
|
||||
Configuration metadata files are located inside jars under `META-INF/spring-configuration-metadata.json`.
|
||||
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
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.format.group]]
|
||||
[[appendix.configuration-metadata.format.group]]
|
||||
=== Group Attributes
|
||||
The JSON object contained in the `groups` array can contain the attributes shown in the following table:
|
||||
|
||||
@ -139,7 +139,7 @@ The JSON object contained in the `groups` array can contain the attributes shown
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.format.property]]
|
||||
[[appendix.configuration-metadata.format.property]]
|
||||
=== Property Attributes
|
||||
The JSON object contained in the `properties` array can contain the attributes described in the following table:
|
||||
|
||||
@ -254,7 +254,7 @@ Doing so is particularly useful when a `replacement` is provided.
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.format.hints]]
|
||||
[[appendix.configuration-metadata.format.hints]]
|
||||
=== Hint Attributes
|
||||
The JSON object contained in the `hints` array can contain the attributes shown in the following table:
|
||||
|
||||
@ -317,7 +317,7 @@ The JSON object contained in the `providers` attribute of each `hint` element ca
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.format.repeated-items]]
|
||||
[[appendix.configuration-metadata.format.repeated-items]]
|
||||
=== Repeated Metadata Items
|
||||
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.
|
||||
@ -325,7 +325,7 @@ While the same names appearing in the metadata multiple times should not be comm
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints]]
|
||||
[[appendix.configuration-metadata.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:
|
||||
|
||||
@ -334,10 +334,10 @@ To improve the user experience and further assist the user in configuring a give
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints.value-hint]]
|
||||
[[appendix.configuration-metadata.manual-hints.value-hint]]
|
||||
=== Value Hint
|
||||
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 <<appendix.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.
|
||||
|
||||
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
|
||||
----
|
||||
|
||||
The magic values are (in this example) are `sample1` and `sample2`.
|
||||
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>>:
|
||||
In order to offer additional content assistance for the keys, you could add the following JSON to <<appendix.configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
|
||||
|
||||
[source,json,indent=0]
|
||||
----
|
||||
@ -380,7 +380,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints.value-providers]]
|
||||
[[appendix.configuration-metadata.manual-hints.value-providers]]
|
||||
=== Value Providers
|
||||
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.
|
||||
@ -424,7 +424,7 @@ If no provider for a given property is supported, no special content assistance
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints.value-providers.any]]
|
||||
[[appendix.configuration-metadata.manual-hints.value-providers.any]]
|
||||
==== Any
|
||||
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.
|
||||
@ -459,7 +459,7 @@ Note that, in the preceding example, any other value is also allowed.
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints.value-providers.class-reference]]
|
||||
[[appendix.configuration-metadata.manual-hints.value-providers.class-reference]]
|
||||
==== Class Reference
|
||||
The **class-reference** provider auto-completes classes available in the project.
|
||||
This provider supports the following parameters:
|
||||
@ -503,7 +503,7 @@ The following metadata snippet corresponds to the standard `server.servlet.jsp.c
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints.value-providers.handle-as]]
|
||||
[[appendix.configuration-metadata.manual-hints.value-providers.handle-as]]
|
||||
==== Handle As
|
||||
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.
|
||||
@ -553,7 +553,7 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints.value-providers.logger-name]]
|
||||
[[appendix.configuration-metadata.manual-hints.value-providers.logger-name]]
|
||||
==== Logger Name
|
||||
The **logger-name** provider auto-completes valid logger names and <<features.adoc#features.logging.log-groups,logger groups>>.
|
||||
Typically, package and class names available in the current project can be auto-completed.
|
||||
@ -640,7 +640,7 @@ As Spring Boot defines a few logger groups out-of-the-box, dedicated value hints
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints.value-providers.spring-bean-reference]]
|
||||
[[appendix.configuration-metadata.manual-hints.value-providers.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.
|
||||
This provider supports the following parameters:
|
||||
@ -680,7 +680,7 @@ If you provide that hint, you still need to transform the bean name into an actu
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.manual-hints.value-providers.spring-profile-name]]
|
||||
[[appendix.configuration-metadata.manual-hints.value-providers.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.
|
||||
|
||||
@ -702,14 +702,14 @@ The following metadata snippet corresponds to the standard `spring.profiles.acti
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.annotation-processor]]
|
||||
[[appendix.configuration-metadata.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.
|
||||
The jar includes a Java annotation processor which is invoked as your project is compiled.
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.annotation-processor.configuring]]
|
||||
[[appendix.configuration-metadata.annotation-processor.configuring]]
|
||||
=== Configuring the Annotation Processor
|
||||
To use the processor, include a dependency on `spring-boot-configuration-processor`.
|
||||
|
||||
@ -763,7 +763,7 @@ You could also let the AspectJ plugin run all the processing and disable annotat
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.annotation-processor.automatic-metadata-generation]]
|
||||
[[appendix.configuration-metadata.annotation-processor.automatic-metadata-generation]]
|
||||
=== Automatic Metadata Generation
|
||||
The processor picks up both classes and methods that are annotated with `@ConfigurationProperties`.
|
||||
|
||||
@ -807,7 +807,7 @@ The annotation processor applies a number of heuristics to extract the default v
|
||||
Default values have to be provided statically. In particular, do not refer to a constant defined in another class.
|
||||
Also, the annotation processor cannot auto-detect default values for ``Enum``s and ``Collections``s.
|
||||
|
||||
For cases where the default value could not be detected, <<configuration-metadata.annotation-processor.adding-additional-metadata,manual metadata>> should be provided.
|
||||
For cases where the default value could not be detected, <<appendix.configuration-metadata.annotation-processor.adding-additional-metadata,manual metadata>> should be provided.
|
||||
Consider the following example:
|
||||
|
||||
[source,java,pending-extract=true,indent=0,subs="verbatim,quotes,attributes"]
|
||||
@ -831,7 +831,7 @@ Consider the following example:
|
||||
}
|
||||
----
|
||||
|
||||
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>>:
|
||||
In order to document default values for properties in the class above, you could add the following content to <<appendix.configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
|
||||
|
||||
[source,json,indent=0]
|
||||
----
|
||||
@ -851,7 +851,7 @@ NOTE: Only the `name` of the property is required to document additional metadat
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties]]
|
||||
[[appendix.configuration-metadata.annotation-processor.automatic-metadata-generation.nested-properties]]
|
||||
==== Nested Properties
|
||||
The annotation processor automatically considers inner classes as nested properties.
|
||||
Rather than documenting the `ip` and `port` at the root of the namespace, we could create a sub-namespace for it.
|
||||
@ -888,7 +888,7 @@ TIP: This has no effect on collections and maps, as those types are automaticall
|
||||
|
||||
|
||||
|
||||
[[configuration-metadata.annotation-processor.adding-additional-metadata]]
|
||||
[[appendix.configuration-metadata.annotation-processor.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.
|
||||
You may also need to tune some attributes of an existing key.
|
||||
|
@ -1,5 +1,5 @@
|
||||
[appendix]
|
||||
[[dependency-versions]]
|
||||
[[appendix.dependency-versions]]
|
||||
= Dependency versions
|
||||
include::attributes.adoc[]
|
||||
|
||||
@ -7,7 +7,7 @@ This appendix provides details of the dependencies that are managed by Spring Bo
|
||||
|
||||
|
||||
|
||||
[[dependency-versions.coordinates]]
|
||||
[[appendix.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.
|
||||
@ -17,7 +17,7 @@ include::generated-dependency-versions.adoc[]
|
||||
|
||||
|
||||
|
||||
[[dependency-versions.properties]]
|
||||
[[appendix.dependency-versions.properties]]
|
||||
== Version Properties
|
||||
|
||||
The following table provides all properties that can be used to override the versions managed by Spring Boot.
|
||||
|
@ -104,4 +104,4 @@ Finally, we have a few topics for more advanced users:
|
||||
|
||||
* *Spring Boot Applications Deployment:* <<deployment.adoc#deployment.cloud, Cloud Deployment>> | <<deployment.adoc#deployment.installing.nix-services, OS Service>>
|
||||
* *Build tool plugins:* <<build-tool-plugins.adoc#build-tool-plugins.maven, Maven>> | <<build-tool-plugins.adoc#build-tool-plugins.gradle, Gradle>>
|
||||
* *Appendix:* <<common-application-properties.adoc#common-application-properties,Application Properties>> | <<configuration-metadata.adoc#configuration-metadata,Configuration Metadata>> | <<auto-configuration-classes.adoc#auto-configuration-classes,Auto-configuration Classes>> | <<test-auto-configuration.adoc#test-auto-configuration,Test Auto-configuration Annotations>> | <<executable-jar.adoc#executable-jar,Executable Jars>> | <<dependency-versions.adoc#dependency-versions,Dependency Versions>>
|
||||
* *Appendix:* <<common-application-properties.adoc#appendix.common-application-properties,Application Properties>> | <<configuration-metadata.adoc#appendix.configuration-metadata,Configuration Metadata>> | <<auto-configuration-classes.adoc#appendix.auto-configuration-classes,Auto-configuration Classes>> | <<test-auto-configuration.adoc#appendix.test-auto-configuration,Test Auto-configuration Annotations>> | <<executable-jar.adoc#appendix.executable-jar,Executable Jars>> | <<dependency-versions.adoc#appendix.dependency-versions,Dependency Versions>>
|
||||
|
@ -1,5 +1,5 @@
|
||||
[appendix]
|
||||
[[executable-jar]]
|
||||
[[appendix.executable-jar]]
|
||||
= The Executable Jar Format
|
||||
include::attributes.adoc[]
|
||||
|
||||
@ -10,7 +10,7 @@ If you need to create executable jars from a different build system or if you ar
|
||||
|
||||
|
||||
|
||||
[[executable-jar.nested-jars]]
|
||||
[[appendix.executable-jar.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).
|
||||
This can be problematic if you need to distribute a self-contained application that can be run from the command line without unpacking.
|
||||
@ -23,7 +23,7 @@ Spring Boot takes a different approach and lets you actually nest jars directly.
|
||||
|
||||
|
||||
|
||||
[[executable-jar.nested-jars.jar-structure]]
|
||||
[[appendix.executable-jar.nested-jars.jar-structure]]
|
||||
=== The Executable Jar File Structure
|
||||
Spring Boot Loader-compatible jar files should be structured in the following way:
|
||||
|
||||
@ -53,7 +53,7 @@ Dependencies should be placed in a nested `BOOT-INF/lib` directory.
|
||||
|
||||
|
||||
|
||||
[[executable-jar.nested-jars.war-structure]]
|
||||
[[appendix.executable-jar.nested-jars.war-structure]]
|
||||
=== The Executable War File Structure
|
||||
Spring Boot Loader-compatible war files should be structured in the following way:
|
||||
|
||||
@ -87,7 +87,7 @@ Any dependencies that are required when running embedded but are not required wh
|
||||
|
||||
|
||||
|
||||
[[executable-jar.nested-jars.index-files]]
|
||||
[[appendix.executable-jar.nested-jars.index-files]]
|
||||
=== Index Files
|
||||
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, and it provides the ordering that jars should be added to the classpath.
|
||||
@ -98,7 +98,7 @@ These files, however, are _not_ parsed internally as YAML and they must be writt
|
||||
|
||||
|
||||
|
||||
[[executable-jar.nested-jars.classpath-index]]
|
||||
[[appendix.executable-jar.nested-jars.classpath-index]]
|
||||
=== Classpath Index
|
||||
The classpath index file can be provided in `BOOT-INF/classpath.idx`.
|
||||
It provides a list of jar names (including the directory) in the order that they should be added to the classpath.
|
||||
@ -130,7 +130,7 @@ The index file would look like this:
|
||||
|
||||
|
||||
|
||||
[[executable-jar.nested-jars.layer-index]]
|
||||
[[appendix.executable-jar.nested-jars.layer-index]]
|
||||
=== Layer Index
|
||||
The layers 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.
|
||||
@ -154,7 +154,7 @@ A typical example of a layers index would be:
|
||||
|
||||
|
||||
|
||||
[[executable-jar.jarfile-class]]
|
||||
[[appendix.executable-jar.jarfile-class]]
|
||||
== Spring Boot's "`JarFile`" Class
|
||||
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.
|
||||
@ -181,7 +181,7 @@ We do not need to unpack the archive, and we do not need to read all entry data
|
||||
|
||||
|
||||
|
||||
[[executable-jar.jarfile-class.compatibilty]]
|
||||
[[appendix.executable-jar.jarfile-class.compatibilty]]
|
||||
=== Compatibility with the Standard Java "`JarFile`"
|
||||
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.
|
||||
@ -189,7 +189,7 @@ The `getURL()` method returns a `URL` that opens a connection compatible with `j
|
||||
|
||||
|
||||
|
||||
[[executable-jar.launching]]
|
||||
[[appendix.executable-jar.launching]]
|
||||
== 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.
|
||||
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.
|
||||
@ -204,7 +204,7 @@ You can add additional locations by setting an environment variable called `LOAD
|
||||
|
||||
|
||||
|
||||
[[executable-jar.launching.manifest]]
|
||||
[[appendix.executable-jar.launching.manifest]]
|
||||
=== Launcher Manifest
|
||||
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.
|
||||
@ -230,7 +230,7 @@ The classpath is deduced from the nested jars.
|
||||
|
||||
|
||||
|
||||
[[executable-jar.property-launcher]]
|
||||
[[appendix.executable-jar.property-launcher]]
|
||||
== PropertiesLauncher Features
|
||||
`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:
|
||||
@ -314,13 +314,13 @@ The following rules apply to working with `PropertiesLauncher`:
|
||||
|
||||
|
||||
|
||||
[[executable-jar.restrictions]]
|
||||
[[appendix.executable-jar.restrictions]]
|
||||
== Executable Jar Restrictions
|
||||
You need to consider the following restrictions when working with a Spring Boot Loader packaged application:
|
||||
|
||||
|
||||
|
||||
[[executable-jar-zip-entry-compression]]
|
||||
[[appendix.executable-jar-zip-entry-compression]]
|
||||
* Zip entry compression:
|
||||
The `ZipEntry` for a nested jar must be saved by using the `ZipEntry.STORED` method.
|
||||
This is required so that we can seek directly to individual content within the nested jar.
|
||||
@ -328,7 +328,7 @@ The content of the nested jar file itself can still be compressed, as can any ot
|
||||
|
||||
|
||||
|
||||
[[executable-jar-system-classloader]]
|
||||
[[appendix.executable-jar-system-classloader]]
|
||||
* System classLoader:
|
||||
Launched applications should use `Thread.getContextClassLoader()` when loading classes (most libraries and frameworks do so by default).
|
||||
Trying to load nested jar classes with `ClassLoader.getSystemClassLoader()` fails.
|
||||
@ -337,7 +337,7 @@ For this reason, you should consider a different logging implementation.
|
||||
|
||||
|
||||
|
||||
[[executable-jar.alternatives]]
|
||||
[[appendix.executable-jar.alternatives]]
|
||||
== Alternative Single Jar Solutions
|
||||
If the preceding restrictions mean that you cannot use Spring Boot Loader, consider the following alternatives:
|
||||
|
||||
|
@ -717,7 +717,7 @@ If you want to support your own locations, see the `ConfigDataLocationResolver`
|
||||
|
||||
|
||||
|
||||
[[features.external-config.file.importing-extensionless]]
|
||||
[[features.external-config.files.importing-extensionless]]
|
||||
==== Importing Extensionless Files
|
||||
Some cloud platforms cannot add a file extension to volume mounted files.
|
||||
To import these extensionless files, you need to give Spring Boot a hint so that it knows how to load them.
|
||||
@ -1180,7 +1180,7 @@ include::{include-springbootfeatures}/externalizedconfiguration/use/MyService.ja
|
||||
----
|
||||
|
||||
TIP: Using `@ConfigurationProperties` also lets you generate metadata files that can be used by IDEs to offer auto-completion for your own keys.
|
||||
See the <<configuration-metadata.adoc#configuration-metadata,appendix>> for details.
|
||||
See the <<configuration-metadata.adoc#appendix.configuration-metadata,appendix>> for details.
|
||||
|
||||
|
||||
|
||||
@ -1578,7 +1578,7 @@ The following table summarizes the features that are supported by `@Configuratio
|
||||
| Yes
|
||||
| Limited (see <<boot-features-external-config-vs-value-note,note below>>)
|
||||
|
||||
| <<configuration-metadata.adoc#configuration-metadata,Meta-data support>>
|
||||
| <<configuration-metadata.adoc#appendix.configuration-metadata,Meta-data support>>
|
||||
| Yes
|
||||
| No
|
||||
|
||||
@ -2564,7 +2564,7 @@ For machine clients, it produces a JSON response with details of the error, the
|
||||
For browser clients, there is a "`whitelabel`" error view that renders the same data in HTML format (to customize it, add a `View` that resolves to `error`).
|
||||
|
||||
There are a number of `server.error` properties that can be set if you want to customize the default error handling behavior.
|
||||
See the <<common-application-properties.adoc#common-application-properties.server, "`Server Properties`">> section of the Appendix.
|
||||
See the <<common-application-properties.adoc#appendix.common-application-properties.server, "`Server Properties`">> section of the Appendix.
|
||||
|
||||
To replace the default behavior completely, you can implement `ErrorController` and register a bean definition of that type or add a bean of type `ErrorAttributes` to use the existing mechanism but replace the contents.
|
||||
|
||||
@ -3697,7 +3697,7 @@ The following connection pools are supported by `DataSourceBuilder`:
|
||||
|
||||
|
||||
|
||||
[[features.sql.configure-datasource.jndi]]
|
||||
[[features.sql.datasource.jndi]]
|
||||
==== Connection to a JNDI DataSource
|
||||
If you deploy your Spring Boot application to an Application Server, you might want to configure and manage your DataSource by using your Application Server's built-in features and access it by using JNDI.
|
||||
|
||||
@ -5381,7 +5381,7 @@ You can customize this behaviour using the configprop:spring.kafka.streams.auto-
|
||||
|
||||
[[features.messaging.kafka.additional-properties]]
|
||||
==== Additional Kafka Properties
|
||||
The properties supported by auto configuration are shown in <<common-application-properties.adoc#common-application-properties>>.
|
||||
The properties supported by auto configuration are shown in <<common-application-properties.adoc#appendix.common-application-properties>>.
|
||||
Note that, for the most part, these properties (hyphenated or camelCase) map directly to the Apache Kafka dotted properties.
|
||||
Refer to the Apache Kafka documentation for details.
|
||||
|
||||
@ -5661,7 +5661,7 @@ To ensure uniqueness in production, you should configure the configprop:spring.j
|
||||
If you package your Spring Boot application as a `war` or `ear` file and deploy it to a Java EE application server, you can use your application server's built-in transaction manager.
|
||||
Spring Boot tries to auto-configure a transaction manager by looking at common JNDI locations (`java:comp/UserTransaction`, `java:comp/TransactionManager`, and so on).
|
||||
If you use a transaction service provided by your application server, you generally also want to ensure that all resources are managed by the server and exposed over JNDI.
|
||||
Spring Boot tries to auto-configure JMS by looking for a `ConnectionFactory` at the JNDI path (`java:/JmsXA` or `java:/XAConnectionFactory`), and you can use the <<features.sql.configure-datasource.jndi, configprop:spring.datasource.jndi-name[] property>> to configure your `DataSource`.
|
||||
Spring Boot tries to auto-configure JMS by looking for a `ConnectionFactory` at the JNDI path (`java:/JmsXA` or `java:/XAConnectionFactory`), and you can use the <<features.sql.datasource.jndi, configprop:spring.datasource.jndi-name[] property>> to configure your `DataSource`.
|
||||
|
||||
|
||||
|
||||
@ -6301,7 +6301,7 @@ To test that object JSON serialization and deserialization is working as expecte
|
||||
* `Gson`
|
||||
* `Jsonb`
|
||||
|
||||
TIP: A list of the auto-configurations that are enabled by `@JsonTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configurations that are enabled by `@JsonTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
If you need to configure elements of the auto-configuration, you can use the `@AutoConfigureJsonTesters` annotation.
|
||||
|
||||
@ -6336,7 +6336,7 @@ To test whether Spring MVC controllers are working as expected, use the `@WebMvc
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@WebMvcTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@WebMvcTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@WebMvcTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
TIP: If you need to register extra components, such as the Jackson `Module`, you can import additional configuration classes by using `@Import` on your test.
|
||||
|
||||
@ -6384,7 +6384,7 @@ To test that {spring-framework-docs}/web-reactive.html[Spring WebFlux] controlle
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@WebFluxTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
TIP: A list of the auto-configurations that are enabled by `@WebFluxTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configurations that are enabled by `@WebFluxTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
TIP: If you need to register extra components, such as Jackson `Module`, you can import additional configuration classes using `@Import` on your test.
|
||||
|
||||
@ -6420,7 +6420,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
(For more about using Cassandra with Spring Boot, see "<<features.nosql.cassandra>>", earlier in this chapter.)
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataCassandraTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataCassandraTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
The following example shows a typical setup for using Cassandra tests in Spring Boot:
|
||||
|
||||
@ -6442,7 +6442,7 @@ This can be disabled using the `showSql()` attribute of the annotation.
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataJpaTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataJpaTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataJpaTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
By default, data JPA tests are transactional and roll back at the end of each test.
|
||||
See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
|
||||
@ -6480,7 +6480,7 @@ By default, it configures an in-memory embedded database and a `JdbcTemplate`.
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@JdbcTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
TIP: A list of the auto-configurations that are enabled by `@JdbcTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configurations that are enabled by `@JdbcTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
By default, JDBC tests are transactional and roll back at the end of each test.
|
||||
See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
|
||||
@ -6503,7 +6503,7 @@ By default, it configures an in-memory embedded database, a `JdbcTemplate`, and
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataJdbcTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
TIP: A list of the auto-configurations that are enabled by `@DataJdbcTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configurations that are enabled by `@DataJdbcTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
By default, Data JDBC tests are transactional and roll back at the end of each test.
|
||||
See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
|
||||
@ -6523,7 +6523,7 @@ If you want to replace it with an in-memory database, you can use `@AutoConfigur
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@JooqTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
TIP: A list of the auto-configurations that are enabled by `@JooqTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configurations that are enabled by `@JooqTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
`@JooqTest` configures a `DSLContext`.
|
||||
The following example shows the `@JooqTest` annotation in use:
|
||||
@ -6546,7 +6546,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
(For more about using MongoDB with Spring Boot, see "<<features.nosql.mongodb>>", earlier in this chapter.)
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataMongoTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataMongoTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
The following class shows the `@DataMongoTest` annotation in use:
|
||||
|
||||
@ -6573,7 +6573,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
(For more about using Neo4J with Spring Boot, see "<<features.nosql.neo4j>>", earlier in this chapter.)
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataNeo4jTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataNeo4jTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
The following example shows a typical setup for using Neo4J tests in Spring Boot:
|
||||
|
||||
@ -6604,7 +6604,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
(For more about using Redis with Spring Boot, see "<<features.nosql.redis>>", earlier in this chapter.)
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataRedisTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataRedisTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
The following example shows the `@DataRedisTest` annotation in use:
|
||||
|
||||
@ -6623,7 +6623,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
(For more about using LDAP with Spring Boot, see "<<features.nosql.ldap>>", earlier in this chapter.)
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataLdapTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataLdapTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
The following example shows the `@DataLdapTest` annotation in use:
|
||||
|
||||
@ -6649,7 +6649,7 @@ By default, it auto-configures Jackson, GSON, and Jsonb support, configures a `R
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@RestClientTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@RestClientTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@RestClientTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
The specific beans that you want to test should be specified by using the `value` or `components` attribute of `@RestClientTest`, as shown in the following example:
|
||||
|
||||
@ -6743,7 +6743,7 @@ By default, it configures a mock `WebServiceServer` bean and automatically custo
|
||||
(For more about using Web Services with Spring Boot, see "<<features.webservices>>", earlier in this chapter.)
|
||||
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@WebServiceClientTest` can be <<test-auto-configuration.adoc#test-auto-configuration,found in the appendix>>.
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@WebServiceClientTest` can be <<test-auto-configuration.adoc#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
The following example shows the `@WebServiceClientTest` annotation in use:
|
||||
|
||||
@ -7253,7 +7253,7 @@ Here are some rules we follow internally to make sure descriptions are consisten
|
||||
* Use `java.time.Duration` rather than `long` and describe the default unit if it differs from milliseconds, e.g. "If a duration suffix is not specified, seconds will be used".
|
||||
* Do not provide the default value in the description unless it has to be determined at runtime.
|
||||
|
||||
Make sure to <<configuration-metadata.adoc#configuration-metadata.annotation-processor,trigger meta-data generation>> so that IDE assistance is available for your keys as well.
|
||||
Make sure to <<configuration-metadata.adoc#appendix.configuration-metadata.annotation-processor,trigger meta-data generation>> so that IDE assistance is available for your keys as well.
|
||||
You may want to review the generated metadata (`META-INF/spring-configuration-metadata.json`) to make sure your keys are properly documented.
|
||||
Using your own starter in a compatible IDE is also a good idea to validate that quality of the metadata.
|
||||
|
||||
@ -7468,7 +7468,7 @@ data class KotlinExampleProperties(
|
||||
}
|
||||
----
|
||||
|
||||
TIP: To generate <<configuration-metadata.adoc#configuration-metadata.annotation-processor,your own metadata>> using the annotation processor, {kotlin-docs}kapt.html[`kapt` should be configured] with the `spring-boot-configuration-processor` dependency.
|
||||
TIP: To generate <<configuration-metadata.adoc#appendix.configuration-metadata.annotation-processor,your own metadata>> using the annotation processor, {kotlin-docs}kapt.html[`kapt` should be configured] with the `spring-boot-configuration-processor` dependency.
|
||||
Note that some features (such as detecting the default value or deprecated items) are not working due to limitations in the model kapt provides.
|
||||
|
||||
|
||||
@ -7569,7 +7569,7 @@ For Gradle, refer to the {spring-boot-gradle-plugin-docs}#packaging-layered-arch
|
||||
|
||||
[[features.container-images.building]]
|
||||
=== Building Container Images
|
||||
Spring Boot applications can be containerized <<features.container-images.building.dockerfiles,using Dockerfiles>>, or by <<features.container-images.images.buildpacks,using Cloud Native Buildpacks to create docker compatible container images that you can run anywhere>>.
|
||||
Spring Boot applications can be containerized <<features.container-images.building.dockerfiles,using Dockerfiles>>, or by <<features.container-images.building.buildpacks,using Cloud Native Buildpacks to create docker compatible container images that you can run anywhere>>.
|
||||
|
||||
|
||||
|
||||
@ -7635,7 +7635,7 @@ You can use some combination of `unzip` and `mv` to move things to the right lay
|
||||
|
||||
|
||||
|
||||
[[features.container-images.images.buildpacks]]
|
||||
[[features.container-images.building.buildpacks]]
|
||||
==== Cloud Native Buildpacks
|
||||
Dockerfiles are just one way to build docker images.
|
||||
Another way to build docker images is directly from your Maven or Gradle plugin, using buildpacks.
|
||||
|
@ -252,7 +252,7 @@ NOTE: If you install the Spring Boot CLI by using Homebrew or MacPorts, the comm
|
||||
|
||||
|
||||
|
||||
[[getting-started.installing.scoop]]
|
||||
[[getting-started.installing.cli.scoop]]
|
||||
==== Windows Scoop Installation
|
||||
If you are on a Windows and use https://scoop.sh/[Scoop], you can install the Spring Boot CLI by using the following commands:
|
||||
|
||||
@ -269,7 +269,7 @@ In that case, run `scoop update` and try again.
|
||||
|
||||
|
||||
|
||||
[[getting-started.installing.quick-start]]
|
||||
[[getting-started.installing.cli.quick-start]]
|
||||
==== Quick-start Spring CLI Example
|
||||
You can use the following web application to test your installation.
|
||||
To start, create a file called `app.groovy`, as follows:
|
||||
@ -604,7 +604,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.
|
||||
It can also be problematic if the same filename is used (but with different content) in multiple jars.
|
||||
|
||||
Spring Boot takes a <<executable-jar.adoc#executable-jar, different approach>> and lets you actually nest jars directly.
|
||||
Spring Boot takes a <<executable-jar.adoc#appendix.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`.
|
||||
|
@ -402,7 +402,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`.
|
||||
|
||||
The appendix includes an <<common-application-properties.adoc#common-application-properties, `application.properties`>> example with a list of the most common properties supported by Spring Boot.
|
||||
The appendix includes an <<common-application-properties.adoc#appendix.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`.
|
||||
For more about the exact ordering of loading properties, see "<<spring-boot-features#features.external-config>>".
|
||||
|
||||
@ -656,7 +656,7 @@ As of Undertow 1.4.0+, both `h2` and `h2c` are supported on JDK 8 without any ad
|
||||
=== Configure the Web Server
|
||||
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`, or environment, etc. see "`<<howto.properties-and-configuration.discover-build-in-options-for-external-properties>>`").
|
||||
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.
|
||||
See the list of <<common-application-properties.adoc#common-application-properties>>.
|
||||
See the list of <<common-application-properties.adoc#appendix.common-application-properties>>.
|
||||
|
||||
The previous sections covered already many common use cases, such as compression, SSL or HTTP/2.
|
||||
However, if a configuration key doesn't exist for your use case, you should then look at {spring-boot-module-api}/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`].
|
||||
@ -1076,11 +1076,11 @@ If you provide any `@Beans` of type `MappingJackson2HttpMessageConverter`, they
|
||||
Also, a convenience bean of type `HttpMessageConverters` is provided (and is always available if you use the default MVC configuration).
|
||||
It has some useful methods to access the default and user-enhanced message converters.
|
||||
|
||||
See the "`<<howtospring-mvc.customize-responsebody-rendering>>`" section and the {spring-boot-autoconfigure-module-code}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
|
||||
See the "`<<howto.spring-mvc.customize-responsebody-rendering>>`" section and the {spring-boot-autoconfigure-module-code}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
|
||||
|
||||
|
||||
|
||||
[[howtospring-mvc.customize-responsebody-rendering]]
|
||||
[[howto.spring-mvc.customize-responsebody-rendering]]
|
||||
=== Customize the @ResponseBody Rendering
|
||||
Spring uses `HttpMessageConverters` to render `@ResponseBody` (or responses from `@RestController`).
|
||||
You can contribute additional converters by adding beans of the appropriate type in a Spring Boot context.
|
||||
@ -2578,7 +2578,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.
|
||||
|
||||
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 <<executable-jar.adoc#executable-jar.nested-jars.jar-structure,executable jar format>> packages application classes in `BOOT-INF/classes`.
|
||||
The executable archive cannot be used as a dependency as the <<executable-jar.adoc#appendix.executable-jar.nested-jars.jar-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.
|
||||
|
||||
To produce the two artifacts, one that can be used as a dependency and one that is executable, a classifier must be specified.
|
||||
@ -2735,7 +2735,7 @@ This section answers common questions about traditional deployment.
|
||||
|
||||
|
||||
|
||||
[[howto.howto.traditional-deployment.war]]
|
||||
[[howto.traditional-deployment.war]]
|
||||
=== Create a Deployable War File
|
||||
|
||||
WARNING: Because Spring WebFlux does not strictly depend on the Servlet API and applications are deployed by default on an embedded Reactor Netty server, War deployment is not supported for WebFlux applications.
|
||||
@ -2813,7 +2813,7 @@ This means that, in addition to being deployable to a servlet container, you can
|
||||
|
||||
|
||||
|
||||
[[howto.howto.traditional-deployment.convert-existing-application]]
|
||||
[[howto.traditional-deployment.convert-existing-application]]
|
||||
=== Convert an Existing Application to Spring Boot
|
||||
To convert an existing non-web Spring application to a Spring Boot application, replace the code that creates your `ApplicationContext` and replace it with calls to `SpringApplication` or `SpringApplicationBuilder`.
|
||||
Spring MVC web applications are generally amenable to first creating a deployable war application and then migrating it later to an executable war or jar.
|
||||
@ -2909,7 +2909,7 @@ In that case, we suggest https://stackoverflow.com/questions/tagged/spring-boot[
|
||||
|
||||
|
||||
|
||||
[[howto.howto.traditional-deployment.weblogic]]
|
||||
[[howto.traditional-deployment.weblogic]]
|
||||
=== Deploying a WAR to WebLogic
|
||||
To deploy a Spring Boot application to WebLogic, you must ensure that your servlet initializer *directly* implements `WebApplicationInitializer` (even if you extend from a base class that already implements it).
|
||||
|
||||
@ -2950,8 +2950,8 @@ You can do so by adding a `WEB-INF/weblogic.xml` file with the following content
|
||||
|
||||
|
||||
|
||||
[[howto.howto.traditional-deployment.jedis-instead-of-lettuce]]
|
||||
=== Use Jedis Instead of Lettuce
|
||||
[[howto.jedis-instead-of-lettuce]]
|
||||
== Use Jedis Instead of Lettuce
|
||||
By default, the Spring Boot starter (`spring-boot-starter-data-redis`) uses https://github.com/lettuce-io/lettuce-core/[Lettuce].
|
||||
You need to exclude that dependency and include the https://github.com/xetorthio/jedis/[Jedis] one instead.
|
||||
Spring Boot manages both of these dependencies so you can switch to Jedis without specifying a version.
|
||||
@ -2991,8 +2991,8 @@ The following example shows how to do so in Gradle:
|
||||
|
||||
|
||||
|
||||
[[howto.howto.traditional-deployment.testcontainers]]
|
||||
=== Use Testcontainers for integration testing
|
||||
[[howto.testcontainers]]
|
||||
== Use Testcontainers for integration testing
|
||||
The https://www.testcontainers.org/[Testcontainers] library provides a way to manage services running inside Docker containers.
|
||||
It integrates with JUnit, allowing you to write a test class that can start up a container before any of the tests run.
|
||||
Testcontainers is especially useful for writing integration tests that talk to a real backend service such as MySQL, MongoDB, Cassandra etc.
|
||||
|
@ -23,9 +23,9 @@ The reference documentation consists of the following sections:
|
||||
The reference documentation has the following appendices:
|
||||
|
||||
[horizontal]
|
||||
<<common-application-properties.adoc#common-application-properties,Application Properties>> :: Common application properties that can be used to configure your application.
|
||||
<<configuration-metadata.adoc#configuration-metadata,Configuration Metadata>> :: Metadata used to describe configuration properties.
|
||||
<<auto-configuration-classes.adoc#auto-configuration-classes,Auto-configuration Classes>> :: Auto-configuration classes provided by Spring Boot.
|
||||
<<test-auto-configuration.adoc#test-auto-configuration,Test Auto-configuration Annotations>> :: Test-autoconfiguration annotations used to test slices of your application.
|
||||
<<executable-jar.adoc#executable-jar,Executable Jars>> :: Spring Boot's executable jars, their launchers, and their format.
|
||||
<<dependency-versions.adoc#dependency-versions,Dependency Versions>> :: Details of the dependencies that are managed by Spring Boot.
|
||||
<<common-application-properties.adoc#appendix.common-application-properties,Application Properties>> :: Common application properties that can be used to configure your application.
|
||||
<<configuration-metadata.adoc#appendix.configuration-metadata,Configuration Metadata>> :: Metadata used to describe configuration properties.
|
||||
<<auto-configuration-classes.adoc#appendix.auto-configuration-classes,Auto-configuration Classes>> :: Auto-configuration classes provided by Spring Boot.
|
||||
<<test-auto-configuration.adoc#appendix.test-auto-configuration,Test Auto-configuration Annotations>> :: Test-autoconfiguration annotations used to test slices of your application.
|
||||
<<executable-jar.adoc#appendix.executable-jar,Executable Jars>> :: Spring Boot's executable jars, their launchers, and their format.
|
||||
<<dependency-versions.adoc#appendix.dependency-versions,Dependency Versions>> :: Details of the dependencies that are managed by Spring Boot.
|
||||
|
@ -1,5 +1,5 @@
|
||||
[appendix]
|
||||
[[test-auto-configuration]]
|
||||
[[appendix.test-auto-configuration]]
|
||||
= Test Auto-configuration Annotations
|
||||
include::attributes.adoc[]
|
||||
|
||||
@ -7,7 +7,7 @@ This appendix describes the `@…Test` auto-configuration annotations that Sprin
|
||||
|
||||
|
||||
|
||||
[[test-auto-configuration.slices]]
|
||||
[[appendix.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:
|
||||
|
@ -148,10 +148,11 @@ bom {
|
||||
]
|
||||
}
|
||||
}
|
||||
library("Spring Asciidoctor Extensions", "0.5.1") {
|
||||
library("Spring Asciidoctor Extensions", "0.6.0-SNAPSHOT") {
|
||||
group("io.spring.asciidoctor") {
|
||||
modules = [
|
||||
"spring-asciidoctor-extensions-spring-boot"
|
||||
"spring-asciidoctor-extensions-spring-boot",
|
||||
"spring-asciidoctor-extensions-section-ids"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user