Update classes that throw `PortInUseException` so that they also
include the cause. Prior to this commit the cause was not included
which could make diagnosing the real cause difficult.
See gh-19807
When using constructor binding, if no properties are bound to
a nested property, the top-level instance will be created with a
null value for the nested property.
This commit introduces support for an empty `@DefaultValue` which
indicates that an instance of the nested property must be created
even if nothing is bound to it. It honors any `@DefaultValue`
annotations that the nested property might have in its constructor.
Closes gh-18917
Update `ConditionalOnAvailableEndpoint` so that it now uses the same
matching code as the endpoint filter. This allows the condition to
match endpoint IDs that contain a dash.
In order to share logic, the `ExposeExcludePropertyEndpointFilter` class
has been deprecated and its logic moved to a new `expose` package
under `IncludExcludeEndpointFilter`. This filter is used by both the
`OnAvailableEndpointCondition` and the auto-configuration classes.
Fixes gh-21044
Update `SpringBootContextLoader` so that it correctly deals with an
`@ActiveProfiles` annotation that contains a comma.
Fixes gh-19537
Co-authored-by: Scott Frederick <sfrederick@pivotal.io>
Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
Update `ConfigFileApplicationListener` so that `spring.profiles.active`
and `spring.profiles.include` can use the square bracket list notation.
Prior to this commit, only comma-separated lists could be used for
those values.
Closes gh-21006
This commit ensures that file permissions are set on entries that the
Gradle plugin adds to an archive. It also reverts the constant date
and time used for added entries to a previous value to ensure a time
zone offset is not applied.
See gh-20927
Refine `DataSourceAutoConfiguration` conditions so that an empty
`spring.datasource.url` property can be used to enable the embedded
source.
Fixed gh-20996
This commit marks as deprecated an interface method that is no longer
used, and changes all internal implementations to return `null` to
make the fact that the return value is not used more obvious.
Fixes gh-19844
Prior to this commit, the ManagementErrorEndpoint used to handle error
responses for the management servlet excluded stacktrace and exception
message details from the response unconditionally.
With this commit, the endpoint honors the
`server.error.include-stacktrace` and `server.error.include-details`
properties to conditionally include error details for consistency
with non-management error handling.
Fixes gh-20989
Prior to this commit, default error responses included the message
from a handled exception. When the exception was a BindException, the
error responses could also include an errors attribute containing the
details of the binding failure. These details could leak information
about the application.
This commit removes the exception message and binding errors detail
from error responses by default, and introduces a
`server.error.include-details` property that can be used to cause
these details to be included in the response.
Fixes gh-20505
Update the `HealthEndpointGroups` customization support to use a
post-processor rather than a mutable registry. Although this approach
is slightly less flexible, it removes a lot of complexity from the
`HealthEndpointGroups` code. Specifically, it allows us to drop the
`HealthEndpointGroupsRegistry` interface entirely.
The probe health groups are now added via the post-processor if they
aren't already defined. Unlike the previous implementation, users are
no longer able to customize status aggregation and http status code
mapping rules _unless_ they also re-define the health indicators that
are members of the group.
See gh-20962
Update `AvailabilityProbesAutoConfiguration` to allow the
`management.health.probes.enabled` property to override the platform
detection logic. Prior to this commit, it was possible to use the
property to enable the probes, but it was not possible to disable
them when deploying to Kubernates.
See gh-20962
Relocate probe auto-configuration from the `kubernetes` package to
`availability` since probes could also be used on other platforms.
The classes have also been renamed to named to `AvailabilityProbes...`
See gh-20962
Rename `LivenessProbeHealthIndicator` to `LivenessStateHealthIndicator`
and `ReadinessProbeHealthIndicator` to `ReadinessStateHealthIndicator`.
Also introduce a general purpose `AvailabilityStateHealthIndicator`
class.
See gh-20962
Create a general purpose `AvailabilityState` interface and refactor
the existing `LivenessState` and `ReadinessState` to use it. A single
`AvailabilityChangeEvent` is now used to carry all availability state
updates.
This commit also renames `ApplicationAvailabilityProvider` to
`ApplicationAvailabilityBean` and extracts an `ApplicationAvailability`
interface that other beans can inject. The helps to hide the event
listener method, which is really internal.
Finally the state enums have been renamed as follows:
- `LivenessState.LIVE` -> `LivenessState.CORRECT`
- `ReadinessState.READY` -> `ReadinessState.ACCEPTING_TRAFFIC`
- `ReadinessState.UNREADY` -> `ReadinessState.REFUSING_TRAFFIC`
See gh-20962
Prior to this commit, the Undertow compression configuration provided by
Spring Boot would fail and throw an exception for invalid MIME Types
when trying to check them against the list of configured types for
compression.
This commit ensures that invalid MIME Types are ignored and that
compression is disabled for those.
Fixes gh-20955
With its initial fix in gh-18444, the `WebClient` instrumentation would
record all CANCEL signals, including:
* when a `timeout` expires and the response has not been received
* when the client partially consumes the response body
Since the second use case is arguable intentional, this commit restricts
the instrumentation and thus avoids recording two events for a single
request in that case.
Closes gh-18444
Prior to this commit, cancelled client requests (for example as a result
of a `timeout()` reactor operator would not be recorded by Micrometer.
This commit instruments the cancelled signal for outgoing client
requests and assigns a status `CLIENT_ERROR`.
The cancellation can be intentional (triggering a timeout and falling
back on a faster alternative) or considered as an error. The intent
cannot be derived from the signal itself so we're considering it as a
client error.
Closes gh-18444
Prior to this commit, the `HttpHandlerAutoConfiguration` would rely on
the `WebFluxProperties` bean being present - this is most of the time
true when the appplication is using the WebFlux auto-configuration.
If the application is overriding the WebFlux auto-configuration and
providing its own setup, the properties bean is not present and we
should skip its usage.
Fixes gh-20891
This commit removes the duplication added temporarily in Spring Boot to
initialize a default WavefrontSender builder.
This commit also disables a test is failing at the moment, see
https://github.com/micrometer-metrics/micrometer/issues/1964
See gh-20854
Prior to this commit, processing of multiple properties files
discovered using a wildcard pattern would stop on any error
encountered while processing a file or when an empty properties file
was found, causing subsequent files from the pattern to be ignored.
This commit changes the behavior such that subsequent files are
processed on error or on an empty file.
Fixes gh-20873
Rename the SAML `singleSignOn` nested property to `singleSignOn` so
that we don't get problems when using uppercase environment variable
names.
See gh-20584
Rework the rename logic used to include the reference PDF to try
and workaround the following local build error:
Encountered duplicate path "reference/pdf/spring-boot-reference.pdf"
during copy operation configured with DuplicatesStrategy.FAIL
See gh-20829
This commit adds examples for configuring the default builder to use
an HTTP/HTTPS proxy when building OCI images using the Maven or Gradle
plugin.
Fixes gh-19984
This commit combines index adoc files for single-page HTML and PDF
into one file to remove duplication. It also renames index files to
reflect the separation between source format and generated output
format.
Finishes gh-20829
ExecutableArchiveLauncher.createClassLoader(Iterator) calls
createClassLoader(URL) method with 'super'. This means overriding
createClassLoader(URL) is not possible without also overriding
createClassLoader(Iterator). The switch to 'this' enables that.
See gh-20851
This commit upgrades the Wavefront metrics export auto-configuration to
provide a `WavefrontSender` if necessary and use that to export metrics
rather than the http client Micrometer used previously.
As a result, the "read-timeout" and "connect-timeout" properties are no
longer honoured.
Closes gh-20810
StatsD no longer publishes metrics about itself and StatsDMetrics is
deprecated as a result. This commit removes the auto-configuration of
it.
Closes gh-20836
This commit exposes an additional property for Graphite that allows to
restore the previous default behaviour with regards to tags, i.e.
prefixing the ones defined by the "tagsAsPrefix" property.
Close gh-20834
This property is a left-over and was never used in Micrometer so this
commit deprecates its use so that it can be removed in the next feature
release.
Closes gh-20835
This commit fixes the AtlasProperties hierarchy so that it no longer is
a StepRegistryProperties. The AtlasConfig on the Micrometer side of
things does not share the common config hierarchy either and some
properties have different default and lifecycle.
Closes gh-20843
This commit moves Maven plugin content from several sections in the
main Spring Boot reference documentation to the plugin-specific
documentation.
Fixes gh-19165
Update the Gralde plugin so that layered jars now use the regular "flat"
format. The layers.idx file now describes which layer each file should
be placed.
See gh-20813
Co-authored-by: Phillip Webb <pwebb@pivotal.io>
Update the Maven plugin so that layered jars now use the regular "flat"
format. The layers.idx file now describes which layer each file should
be placed.
See gh-20813
Co-authored-by: Phillip Webb <pwebb@pivotal.io>
Create a dedicated layer that is used to hold the launcher support
classes. The layer sits between `dependencies` and
`snapshot-dependencies` so that the layer is sensible for both
SNAPSHOT and RELEASE versions of Spring Boot
Closes gh-20529
Simplify layer customization logic for both Maven and Gradle and
refactor some internals of the Gradle plugin.
Both Maven and Gradle now use a simpler customization format that
consists of `application`, `dependencies` and `layer order` sections.
The `application`, `dependencies` configurations support one or more
`into` blocks that are used to select content for a specific layer.
Closes gh-20526
This commit adds the new "`spring.main.cloud-platform`" configuration
property. This allows applications to override the auto-detection and
force a specific Cloud Platform. This is useful for testing behavior on
a local machine or force the detection of a particular platform.
This commit also adds a new `CloudPlatform.NONE` value that allows
applications to disable the auto-detection of the Cloud Platform, thus
avoiding issues with false positives.
Closes gh-20553
This commit adds a new configuration property
`"spring.data.elasticsearch.client.reactive.max-in-memory-size"`
which configures the maximum amount of memory buffered by the
`WebClient` used by the Reactive ElasticSearch client.
See gh-20205
This commit adds support for Cloud Native Buildpacks builder platform
API 0.3, which is the latest platform API available currently. Support
for platform API 0.1 has been removed, adopting the policy of the pack
CLI to support the current platform API version and one version prior.
Fixes gh-20757
CNB builder images are now being tagged in a manner that indicates
the version of the platform API implemented. This allows Spring Boot
to default to a builder tag that guarantees API compatibility while
allowing for updates to bundled buildpacks.
Fixes gh-20171
This commit adds documentation for the configuration required to
use a remote Docker daemon with the `build-image` Maven goal or the
`bootBuildImage` Gradle task.
See gh-20538
This commit adds a section to the reference guide on how to initialize
a database using R2DBC. 2 smoke tests are also added to validate this
behaviour with Flyway and Liquibase.
Closes gh-20742