Commit Graph

1211 Commits (1d29443e715f6e5615907d26e08f9ee0f63c23fc)

Author SHA1 Message Date
Stephane Nicoll dac63fc3e5 Polish 4 years ago
Brian Clozel fb1234a22c Upgrade to Reactor 2020.0.0 SNAPSHOTs
See gh-22667
4 years ago
Andy Wilkinson 8b40427402 Merge branch '2.3.x'
Closes gh-22687
4 years ago
Andy Wilkinson 7d25948ab5 Merge branch '2.2.x' into 2.3.x
Closes gh-22686
4 years ago
Andy Wilkinson 59b1df4548 Polish "Look in correct context when finding Liquibase beans"
See gh-22681
4 years ago
biergit 62156810cf Look in correct context when finding Liquibase beans
See gh-22681
4 years ago
Stephane Nicoll 5777aa5615 Start building against Spring Data 2020.0.0 snapshots
See gh-22647
4 years ago
Stephane Nicoll c6fde1e4d5 Polish "Update Neo4j health check to use the Neo4j Driver"
See gh-22302
4 years ago
Gerrit Meier c5a7815e42 Update Neo4j health check to use the Neo4j Driver
This commit replaces the Neo4j-OGM based health checks with one based on
the Neo4j Java driver. A Reactive variant is also added in this commit.

See gh-22302
4 years ago
Stephane Nicoll 2756f5911f Merge branch '2.3.x'
Closes gh-22627
4 years ago
Stephane Nicoll 12d78b26b9 Merge branch '2.2.x' into 2.3.x
Closes gh-22626
4 years ago
Stephane Nicoll 16aa8fbc88 Fix actuator dependency on Jackson JSR 310 module
This commit harmonizes dependency declarations for Jackson in the
actuator. Both Jackson and JSR 310 are back to optional in the core
actuator module and mandatory when using the auto-configuration.

Closes gh-22624
4 years ago
Phillip Webb 3d7d9d064c Update copyright year of changed files 4 years ago
Phillip Webb 14c1b0938a Polish 4 years ago
Phillip Webb da69286838 Merge branch '2.3.x' 4 years ago
Phillip Webb d2a7808098 Polish 4 years ago
Phillip Webb 217b2eff89 Merge branch '2.2.x' into 2.3.x 4 years ago
Phillip Webb b5e70157dc Update copyright year of changed files 4 years ago
Phillip Webb 51a26a4d5a Polish 4 years ago
Andy Wilkinson 0ac7178ae1 Merge branch '2.3.x'
Closes gh-22491
4 years ago
dreis2211 198131f5e4 Remove redundant compiler arguments in Gradle build files
See gh-22488
4 years ago
Andy Wilkinson 19ad163486 Merge branch '2.3.x'
Closes gh-22411
4 years ago
Andy Wilkinson accc1f1ca8 Merge branch '2.2.x' into 2.3.x
Closes gh-22410
4 years ago
Andy Wilkinson 21f733b89b Merge branch '2.1.x' into 2.2.x
Closes gh-22409
4 years ago
Andy Wilkinson 179d2c79d6 Avoid trivialising what the reader's learning about
Closes gh-22408
4 years ago
Andy Wilkinson cb7f99ad72 Polish "Measure with nanoseconds in HttpExchangeTracer"
See gh-22266
4 years ago
dreis2211 d72f5139f1 Measure with nanoseconds in HttpExchangeTracer
See gh-22266
4 years ago
Brian Clozel 3f93978e99 Merge branch '2.3.x'
Closes gh-22215
4 years ago
Brian Clozel 86d8366ee2 Polish support for reactive Elasticsearch healthcheck
Fixes gh-21042
4 years ago
Aleksander Lech 203878a16f Add support for reactive Elasticsearch healthcheck
Prior to this commit, configuring a reactive Elasticsearch client would
auto-configure an Actuator Health check using a synchronous client, with
the default configuration properties (so tarting localhost:9200).

This would lead to false reports of unhealthy Elasticsearch clusters
when using reactive clients.

This commit reproduces the logic for MongoDB repositories: if a reactive
variant is available, it is selected for the health check
infrastructure.

See gh-21042
4 years ago
Andy Wilkinson 4ea07f432d Merge branch '2.3.x'
Closes gh-22168
4 years ago
Andy Wilkinson 75fc140e2d Merge branch '2.2.x' into 2.3.x
Closes gh-22167
4 years ago
Andy Wilkinson 3922fb7164 Polish "Avoid NPE when binder is closed before started event"
See gh-22141
4 years ago
im47cn b34c268547 Avoid NPE when binder is closed before started event
Previously, if TomcatMetricsBinder destroy() was called before it had
received an ApplicationStartedEvent an NPE would be thrown due to
TomcatMetrics being null. This NPE was then caught and logged at
warning level by the disposable bean adapter.

This prevents the NPE by checking that the TomcatMetrics instance is
null before calling close() on it.

See gh-22141
4 years ago
Andy Wilkinson fe78be240a Merge branch '2.3.x'
Closes gh-22103
4 years ago
Andy Wilkinson a2f7ce0564 Merge branch '2.2.x' into 2.3.x
Closes gh-22102
4 years ago
Andy Wilkinson 5475f10657 Remove WebClient's in-memory buffer size limit for endpoint tests
Previously, the thread dump endpoint's response could exceed
WebClient's in-memory buffer limt when there were a large number of
threads or the threads had large stacks.

This commit disables WebClient's in-memory buffer size limit so that
the test passing is not dependent on the number of active threads and
their stack sizes.

Closes gh-22101
4 years ago
Scott Frederick 3b587449a6 Provide cluster info in RedisReactiveHealthIndicator
This commit changes the information provided by
RedisReactiveHealthIndicator to include cluster details when Spring
Data Redis detects that Redis is running in a clustered configuration.
This brings the reactive and non-reactive Redis health indicators
into alignment.

Fixes gh-21514
4 years ago
Scott Frederick dba8ca2848 Merge branch '2.3.x'
Closes gh-22095
4 years ago
Scott Frederick 72f37c41fb Merge branch '2.2.x' into 2.3.x
Fixes gh-22061 in 2.3.2
4 years ago
Scott Frederick b27303704f Fix RedisReactiveHealthIndicator in clustered configuration
Prior to Spring Data Redis version 2.2.8, the contents of the
Properties object returned from the
ReactiveRedisConnection.ServerCommands.info API were the same
for clustered and non-clustered Redis configurations, containing a set
of key/value pairs. This allowed ReactiveRedisHealthIndicator to get
a version property using a well-known key. Starting with Spring Data
Redis 2.2.8, the info property keys contain a host:port prefix in a
clustered Redis configuration. This prevented
ReactiveRedisHealthIndicator from getting the version property as
before and resulted in the health always being reported as DOWN.

This commit adjusts ReactiveRedisHealthIndicator to detect the
clustered configuration from Spring Data Redis and find the version
property for one of the reported cluster nodes.

Fixes gh-22061
4 years ago
Andy Wilkinson 0d6ea79007 Start building against Spring Framework 5.3.0 snapshots
See gh-21929
4 years ago
Stephane Nicoll f0f8424191 Merge branch '2.3.x'
Closes gh-22008
4 years ago
dreis2211 855d596c2a Use lazy lambda instead of explicit argument
See gh-21986
4 years ago
Andy Wilkinson 9e08490522 Merge branch 'gh-21271'
Closes gh-21271
4 years ago
Andy Wilkinson 9636350b0b Enable rawtypes compilation warnings
See gh-21271
4 years ago
Andy Wilkinson 056d5f3120 Enable deprecation compilation warnings
See gh-21271
4 years ago
Andy Wilkinson c64649a6d9 Enable unchecked compilation warnings
See gh-21271
4 years ago
Andy Wilkinson 07fb4b065d Merge branch '2.3.x'
Closes gh-21940
4 years ago
Andy Wilkinson 0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
4 years ago
Stephane Nicoll e87c3193ce Polish "Add Java 15 CI"
See gh-21713
4 years ago
dreis2211 cf3cd0be48 Use Class.getName() as fallback in HandlerFunctionDescription
In JDK 15 the concept of hidden classes was introduced, which also
affects Lambdas in so far that Class.getCanonicalName() will return null
for those. This commit uses Class.getName() as a fallback when no
canonical name is available.

See gh-21713
4 years ago
Stephane Nicoll 35e069e2cd Polish "Add health indicator for Cassandra that uses the CqlSession"
See gh-20887
4 years ago
Alexandre Dutra dad9ec86d5 Add health indicator for Cassandra that uses the CqlSession
This commit provides a CassandraDriverHealthIndicator and
CassandraDriverReactiveHealthIndicator that do not require Spring Data.
As a result, a health indicator for Cassandra is provided even if the
application does not use Spring Data.

See gh-20887
4 years ago
Stephane Nicoll 554971d29b Merge branch '2.3.x'
Closes gh-21917
4 years ago
Stephane Nicoll ee250e058a Merge branch '2.2.x' into 2.3.x
Closes gh-21916
4 years ago
Stephane Nicoll ec8c1e3860 Update copyright year of changed files
See gh-21906
4 years ago
lltx de897b9b72 Fix wrong property reference to keys-to-sanitize in Javadoc
See gh-21906
4 years ago
Phillip Webb 16b1d64b43 Merge branch '2.3.x'
Closes gh-21764
5 years ago
dreis2211 eeb1db2176 Use supplier assertions in availability indicator
See gh-21758
5 years ago
Phillip Webb 8a7a5929ae Merge branch '2.3.x' 5 years ago
Phillip Webb cc50605687 Merge branch '2.2.x' into 2.3.x 5 years ago
Phillip Webb 0a05b4c9fd Update copyright year of changed files 5 years ago
Johnny Lim cd1baf18fe Support filtered scrape for Prometheus
See gh-21545
5 years ago
Andy Wilkinson daeca9f332 Restore Boot 2.2's compile-scoped dependencies
Fixes gh-21507
5 years ago
Stephane Nicoll 1d2d76b051 Merge branch '2.2.x'
Closes gh-21560
5 years ago
Stephane Nicoll afcb5d54b2 Polish "Fix uri tag for empty path"
See gh-21392
5 years ago
Jon Schneider f78f2d57e1 Fix uri tag for empty path
See gh-21392
5 years ago
Phillip Webb fd505e516f Merge branch '2.2.x'
Closes gh-21444
5 years ago
Phillip Webb 49a21ded7a Create endpoint beans as late as possible
Update `EndpointDiscoverer` so that `@Endpoint` and `@EndpointExtension`
beans are created as late as possible.

Prior to this commit, endpoint beans and extension beans would be
created during the discovery phase which could cause early bean
initialization. The problem was especially nasty when using an embedded
servlet container since `ServletEndpointRegistrar` is loaded as the
container is initialized. This would trigger discovery and load all
endpoint beans, including the health endpoint, and all health indicator
beans.

Fixes gh-20714
5 years ago
Phillip Webb 038ae93406 Update copyright year of changed files 5 years ago
Scott Frederick a30740f8d2 Separate server properties for message and errors
Prior to this commit, there was a property server.error.include-details
that allowed configuration of the message and errors attributes in a
server error response.

This commit separates the control of the message and errors attributes
into two separate properties named server.error.include-message and
server.error.include-binding-errors. When the message attribute is
excluded from a servlet response, the value is changed from a
hard-coded text value to an empty value.

Fixes gh-20505
5 years ago
Stephane Nicoll ee913503b4 Tolerate Hazelcast 4
This commit updates HazelcastHealthIndicator and
HazelcastCacheMeterBinderProvider so that they work with
Hazelcast 4 while retaining compatibility with Hazelcast 3. Reflection
is used when necessary.

This commit also adds a smoke test that validates those features are
working when Hazelcast 4 is on the classpath.

Closes gh-21169
5 years ago
Brian Clozel ec871d6752 Fix StatusAggregator static initialization
Prior to this commit, there was a cycle between `StatusAggregator` and
`SimpleStatusAggregator`, which caused a static initialization bug -
depending on which class (the implementation or its interface) was
loaded first.

This commit turns the static field of the `StatusAggregator` interface
into a static method to avoid this problem.

Fixes gh-21211
5 years ago
dreis2211 5eb5bf0a2d Polish
See gh-21009
5 years ago
Stephane Nicoll 85e9f713b0 Update copyright year of changed files
See gh-21007
5 years ago
Johnny Lim 29717423a3 Remove this keyword on member method invocations
See gh-21007
5 years ago
Phillip Webb 56711d678a Merge branch '2.2.x'
Closes gh-21083
5 years ago
Phillip Webb 102729b5e1 Merge branch '2.1.x' into 2.2.x
Closes gh-21082
5 years ago
Phillip Webb b3d33754a5 Remove outdated FIXMEs from tests
Closes gh-19782
5 years ago
Phillip Webb bf41da5322 Update copyright year of changed files 5 years ago
Scott Frederick 70d4994502 Disable exception details on default error views
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
5 years ago
dreis2211 b0eea26260 Prevent shaded imports from Datastax
See gh-20967
5 years ago
Phillip Webb 5311c04437 Change HealthEndpointGroups customization support
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
5 years ago
Phillip Webb 82cfd7c6c9 Restructure probes auto-configuration
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
5 years ago
Phillip Webb 71e4801e68 Rename probe health indicators
Rename `LivenessProbeHealthIndicator` to `LivenessStateHealthIndicator`
and `ReadinessProbeHealthIndicator` to `ReadinessStateHealthIndicator`.

Also introduce a general purpose `AvailabilityStateHealthIndicator`
class.

See gh-20962
5 years ago
Phillip Webb bb79c847b2 Allow custom availability states
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
5 years ago
Phillip Webb 1604cb2a1e Polish 5 years ago
dreis2211 4b9986d790 Remove unused fields in tests
See gh-20926
5 years ago
Brian Clozel ce653059c8 Improve recording of cancellation signal in WebClient
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
5 years ago
Brian Clozel 3879a7505c Record cancelled client requests in WebClient
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
5 years ago
Phillip Webb 3ca896e63f Polish 5 years ago
Phillip Webb 5d8d0bb159 Update copyright year of changed files 5 years ago
Andy Wilkinson f238812cea Polish "Improve handling of non-existent path in disk space health check"
See gh-20580
5 years ago
Andreas Born db565cfc3a Improve handling of non-existent path in disk space health check
See gh-20580
5 years ago
Stephane Nicoll ef592eaed8 Merge branch '2.2.x'
Closes gh-20726
5 years ago
Stephane Nicoll ac56db703e Merge branch '2.1.x' into 2.2.x
Closes gh-20725
5 years ago
Stephane Nicoll 88b7b78344 Make sure that cassandra health check reports version
Closes gh-20719
5 years ago
Stephane Nicoll a7e8829560 Polish 5 years ago
Stephane Nicoll 5ad4de184d Merge branch '2.2.x'
Closes gh-20718
5 years ago
Stephane Nicoll 05f10819c4 Merge branch '2.1.x' into 2.2.x
Closes gh-20717
5 years ago
Stephane Nicoll c9e32aaa47 Use LOCAL_ONE when querying system.local
This commit is a follow-up of gh-20709 to apply the same consistency
level to the Cassandra reactive health indicator.

Closes gh-20713
5 years ago
Stephane Nicoll 876371e0fd Merge branch '2.2.x'
Closes gh-20712
5 years ago
Stephane Nicoll a9a6df2ed4 Merge branch '2.1.x' into 2.2.x
Closes gh-20711
5 years ago
Stephane Nicoll 63be1678de Polish "Use LOCAL_ONE when querying system.local"
See gh-20709
5 years ago
Alexandre Dutra 851f631eac Use LOCAL_ONE when querying system.local
The system keyspace has a replication factor of 1 and is local to each
node; it is therefore recommended to query system.local with a
consistency level of ONE or LOCAL_ONE.

Stronger consistency levels may result in an Unavailable error, but this
does not mean that the node is down.

See gh-20709
5 years ago
dreis2211 674f1e77b5 Fix typos
See gh-20704
5 years ago
Brian Clozel eb70fd952f Turn LivenessState and ReadinessState into enums
Prior to this commit, `LivenessState` and `ReadinessState` were
immutable classes. This was done in order to have additional behavior
and information in those classes.

Because the current implementation doesn't need this, this commit turns
those classes into simple enums.
Additional state and information can be added to the
`*StateChangedEvent` classes.

See gh-19593
5 years ago
dreis2211 25f48cb289 Fix typos in HealthEndpointGroupConfigurer
See gh-20628
5 years ago
Phillip Webb 0717de723f Polish 5 years ago
Phillip Webb 9a33a723fe Update copyright year of changed files 5 years ago
Phillip Webb 16b5ea3414 Update copyright year of changed files 5 years ago
dreis2211 ef9f1d39a3 Remove redundant MockitoAnnotations.initMocks()
See gh-20601
5 years ago
Stephane Nicoll 70aa788747 Merge branch '2.2.x'
Closes gh-20600
5 years ago
Stephane Nicoll 8593270b5b Only remove trailing slash from URI value
This commit upgrades the algorithm when trailing slash are to be
ignored. Previously a root URI (i.e. "/") would result to to empty
string which is an issue for monitoring system that requires tag values
to be non empty. If the URI is a single character, the trailing is not
applied and "/" is left as is.

Closes gh-20536
5 years ago
Brian Clozel ffdf9a422f Polish Liveness and Readiness support
This commit moves the core Liveness and Readiness support to its own
`availability` package. We've made this a core concept independent of
Kubernetes.

Spring Boot now produces `LivenessStateChanged` and
`ReadinessStateChanged` events as part of the typical application
lifecycle.

Liveness and Readiness Probes (`HealthIndicator` components and health
groups) are still configured only when deployed on Kubernetes.

This commit also improves the documentation around Probes best practices
and container lifecycle considerations.

See gh-19593
5 years ago
Brian Clozel fd0b2f6695 Add Kubernetes Liveness and Readiness Probes support
Prior to this commit and as of Spring Boot 2.2.0, we would advise
developers to use the Actuator health groups to define custom "liveness"
and "readiness" groups and configure them with subsets of existing
health indicators.

This commit addresses several limitations with that approach.

First, `LivenessState` and `ReadinessState` are promoted to first class
concepts in Spring Boot applications. These states should not only based
on periodic health checks. Applications should be able to track changes
(and adapt their behavior) or update states (when an error happens).

The `ApplicationStateProvider` can be injected and used by applications
components to get the current application state. Components can also
track specific `ApplicationEvent` to be notified of changes, like
`ReadinessStateChangedEvent` and `LivenessStateChangedEvent`.
Components can also publish such events with an
`ApplicationEventPublisher`. Spring Boot will track startup event and
application context state to update the liveness and readiness state of
the application. This infrastructure is available in the
main spring-boot module.

If Spring Boot Actuator is on the classpath, additional
`HealthIndicator` will be contributed to the application:
`"LivenessProveHealthIndicator"` and `"ReadinessProbeHealthIndicator"`.
Also, "liveness" and "readiness" Health groups will be defined if
they're not configured already.

Closes gh-19593
5 years ago
Brian Clozel b680db6cd8 Add HealthEndpointGroupsRegistry and its Customizer
Prior to this commit, `HealthContributor` would be exposed under the
main `HealthEndpoint` and subgroups, `HealthEndpointGroups`. Groups are
driven by configuration properties and there was no way to contribute
programmatically new groups.

This commit introduces the `HealthEndpointGroupsRegistry` (a mutable
version of `HealthEndpointGroups`) and a
`HealthEndpointGroupsRegistryCustomizer`. This allows configurations to
add/remove groups during Actuator auto-configuration.

Closes gh-20554
5 years ago
Stephane Nicoll abe43b2e83 Upgrade to Couchbase SDK v3
This commit upgrades to the Couchbase SDK v3 which brings the following
breaking changes:

* Bootstrap hosts have been replaced by a connection string and the
authentication is now mandatory.
* A `Bucket` is no longer auto-configured. The
`spring.couchbase.bucket.*` properties have been removed
* `ClusterInfo` no longer exists and has been replaced by a dedicated
API on `Cluster`.
* `CouchbaseEnvironment` no longer exist in favour of
`ClusterEnvironment`, the customizer has been renamed accordingly.
* The bootstrap-related properties have been removed. Users requiring
custom ports should supply the seed nodes and initialize a Cluster
themselves.
* The endpoints-related configuration has been consolidated in a
single IO configuration.

The Spring Data Couchbase provides an integration with the new SDK. This
leads to the following changes:

* A convenient `CouchbaseClientFactory` is auto-configured.
* Repositories are configured against a bucket and a scope. Those can
be set via configuration in `spring.data.couchbase.*`.
* The default consistency property has been removed in favour of a more
flexible annotation on the repository query methods instead. You can now
specify different query consistency on a per method basis.
* The `CacheManager` implementation is provided, as do other stores for
consistency so a dependency on `couchbase-spring-cache` is no longer
required.

See gh-19893

Co-authored-by: Michael Nitschinger <michael@nitschinger.at>
5 years ago
dreis2211 3e24df3beb Fix method order checkstyle issue
See gh-20525
5 years ago
Andy Wilkinson 0315724126 Cache endpoint responses on a per-principal basis
Previously, any HTTP request to an endpoint that included a principal
would bypass the cache. This prevented authenticated requests from
making use of the cache and its configurable time-to-live.

This commit updates the caching operation invoker to include the
principal, if any, in its cache key. As a result, requests that
include a principal will make use of the cache, potentially returning
the result of a previous invocation of the same endpoint by the same
principal.

Closes gh-19538
5 years ago
Andy Wilkinson ef9960c69f Allow additional tags to be contributed to WebMvc and WebFlux defaults
Closes gh-20175
5 years ago
Andy Wilkinson c917b61484 Reinstate leading / in default value for spring.liquibase.change-log
Unfortunately, while redundant for new applications, removing the
leading slash adversely affected existing application upon upgrades as
it caused Liquibase to re-apply every change log.

Closes gh-20177
5 years ago
Stephane Nicoll 278f769f80 Merge branch '2.2.x' 5 years ago
Stephane Nicoll 1fdb08300b Polish 5 years ago
Scott Frederick 185f644877 Remove the body from actuator 404 responses
When a request to the /actuator/env/{toMatch} endpoint does not match a
property, a response status 404 was being returned along with a body
containing the existing property sources. This commit removes the body
from the response to be more consistent with a typical 404 response.

Fixes gh-20314
5 years ago
Stephane Nicoll fa8a09d46d Merge branch '2.2.x'
Closes gh-20395
5 years ago
dreis2211 f08a9db984 Fix some deprecations
See gh-20388
5 years ago
Johnny Lim bd08b4d91c Polish DataSourceHealthIndicator
See gh-20367
5 years ago
Stephane Nicoll 51c29229d3 Polish "Improve details of neo4h health indicator"
See gh-20356
5 years ago
Said BOUDJELDA b09d5d27e0 Improve details of neo4h health indicator
This commit changes the neo4j health indicator to provide the version
and edition of the neo4j database.

See gh-20356
5 years ago
Stephane Nicoll 89e5c285e5 Merge branch '2.2.x'
Closes gh-20387
5 years ago
Johnny Lim 1721aeccb0 Use ServerHttpResponse.getRawStatusCode() in WebFluxTags
See gh-19987
5 years ago
Stephane Nicoll 925756dae1 Polish "Add descriptions for data source pool metrics"
See gh-20354
5 years ago
Johnny Lim 21a0b0544a Add descriptions for data source pool metrics
See gh-20354
5 years ago
Stephane Nicoll 45e6058761 Add R2BC connection pool metrics
This commit adds metrics support for `ConnectionPool` beans.

See gh-19988

Co-authored-by: Mark Paluch <mpaluch@pivotal.io>
Co-authored-by: Tadaya Tsuyukubo <tadaya@ttddyy.net>
5 years ago
Stephane Nicoll bee7302fc7 Add R2BC connection factory health check
This commit adds an health indicator for R2DBC. If a validation query is
provided, it is used to validate the state of the database. If not, a
check of the connection is issued.

See gh-19988

Co-authored-by: Mark Paluch <mpaluch@pivotal.io>
5 years ago
Brian Clozel e73ee7b3fe Merge branch '2.2.x'
Closes gh-20293
5 years ago
Brian Clozel 11b9862064 Revert "Clear ProducesRequestCondition cache attribute"
Closes gh-20292
5 years ago
Brian Clozel ab72cc8fdb Revert "Add actuator specific ObjectMapper"
See gh-12951
See gh-20291
5 years ago
Dmytro Nosan 1a8c321a7b Support nested requests in MetricsClientHttpRequestInterceptor
Prior to this commit, requests made by `HttpRequestInterceptor`
instances configured on `RestTemplate` would not be recorded
properly.

This commit ensures that nested requests are recorded separately.

Closes gh-20231
5 years ago
Stephane Nicoll 26c673a1a4 Merge branch '2.2.x' 5 years ago
Stephane Nicoll 592ae85043 Merge branch '2.1.x' into 2.2.x 5 years ago
Stephane Nicoll 6aeff91f50 Polish 5 years ago
Stephane Nicoll 287d577aea Merge branch '2.2.x'
Closes gh-20218
5 years ago
Stephane Nicoll 16111f126e Use query-less datasource validation by default
This commit changes DataSourceHealthIndicator to validate the connection
rather than issuing a query to the database. If a custom validation
query is specified, it uses that as before.

Closes gh-17582
5 years ago
Brian Clozel e59d3fbb86 Clear ProducesRequestCondition cache attribute
As of spring-projects/spring-framework#22644, Spring Framework caches
the "produces" condition when matching for endpoints in the
`HandlerMapping` infrastructure. This has been improved in
spring-projects/spring-framework#23091 to prevent side-effects in other
implementations.

Prior to this commit, the Spring Boot actuator infrastructure for
`EndpointHandlerMapping` would not clear the cached attribute,
presenting the same issue as Spring Framework's infrastructure. This
means that a custom arrangement with custom `HandlerMapping` or
`ContentTypeResolver` would not work properly and reuse the cached
produced conditions for other, unintented, parts of the handler mapping
process.

This commit clears the cached data and ensures that other handler
mapping implementations are free of that side-effect.

Fixes gh-20150
5 years ago
Stephane Nicoll 03bee83991 Update copyright date
See gh-20192
5 years ago
zhangt2333 e2d87a89d0 Polish
See gh-20192
5 years ago
Stephane Nicoll 2ede9e63b9 Merge branch '2.1.x' into 2.2.x
Closes gh-20117
5 years ago
Stephane Nicoll 32c1dd45a9 Revert "Merge pull request #19926 from xak2000"
Closes gh-19926
5 years ago
Brian Clozel 97af0b2f3a Add actuator specific ObjectMapper
Prior to this commit, Actuator endpoints would use the application
ObjectMapper instance for serializing payloads as JSON. This was
problematic in several cases:

* application-specific configuration would change the actuator endpoint
output.
* choosing a different JSON mapper implementation in the application
would break completely some endpoints.

Spring Boot Actuator already has a hard dependency on Jackson, and this
commit uses that fact to configure a shared `ObjectMapper` instance that
will be used by the Actuator infrastructure consistently, without
polluting the application context.

This `ObjectMapper` is used in Actuator for:

* JMX endpoints
* Spring MVC endpoints with an HTTP message converter
* Spring WebFlux endpoints with an `Encoder`
* Jersey endpoints with a `ContextResolver<ObjectMapper>`

For all web endpoints, this configuration is limited to the
actuator-specific media types such as
`"application/vnd.spring-boot.actuator.v3+json"`.

Fixes gh-12951
5 years ago
Stephane Nicoll 466c1ba251 Merge branch '2.2.x'
Closes gh-20118
5 years ago
Stephane Nicoll a425cc1b46 Merge branch '2.1.x' into 2.2.x
Closes gh-20117
5 years ago
Ruslan Stelmachenko 5f7e1ac4f2 Remove unnecessary leading slash in changelog locations
See gh-19926
5 years ago
Madhura Bhave 19b7dc8e4f Merge branch '2.2.x'
Closes gh-20114
5 years ago
Madhura Bhave d485708f68 Fix 404 when composite contributor is added to a group
Fixes gh-19974
5 years ago
Madhura Bhave eeab9233cc Merge branch '2.2.x'
Closes gh-20056
5 years ago
Madhura Bhave acc453db4a Polish contribution
See gh-19999
5 years ago
cbono badc83d368 Add 'uris', 'address' and 'addresses' to keys to sanitize.
See gh-19999
5 years ago
Stephane Nicoll 1c87325420 Merge branch '2.2.x' 5 years ago
Stephane Nicoll d85bdfb23c Fix checkstyle violation 5 years ago
Stephane Nicoll 9aef2bde77 Merge branch '2.2.x'
Closes gh-20030
5 years ago
Stephane Nicoll 10643b7702 Polish "Stop time web metrics when autotime is disabled"
See gh-19981
5 years ago
babjo e323e05eea Stop time web metrics when autotime is disabled
See gh-19981
5 years ago
Scott Frederick 60f5bb1636 Remove health actuator code deprecated in 2.2
This partially re-applies the deprecation removal from commit
df1837a16b,
without removing CompositeHealthIndicator, HealthAggregator, and related
configuration that is required by Spring Cloud.
5 years ago
Scott Frederick de1a26cf35 Revert "Remove deprecated HealthIndicator and HealthAggregator 2.2 code"
This reverts commit df1837a16b.
5 years ago
Stephane Nicoll b5e23e7405 Update copyright year of changed files
See gh-20020
5 years ago
Johnny Lim b67ece48e4 Polish
See gh-20020
5 years ago
Stephane Nicoll c4daff7225 Polish "Upgrade to MongoDB Java Driver 4.0 beta1"
See gh-19960
5 years ago
Christoph Strobl d2d6dbdc00 Upgrade to MongoDB Java Driver 4.0 beta1
See gh-19960
5 years ago
dreis2211 56df70b0e7 Use Spring 5 module of Jersey
See gh-20009
5 years ago
Johnny Lim e6d5f5a271 Polish
See gh-19995
5 years ago
Andy Wilkinson 6db5ca97d3 Sort names alphabetically in metrics list response
Closes gh-19934
5 years ago
Madhura Bhave dc542b29d8 Merge branch '2.2.x'
Closes gh-19977
5 years ago
Johnny Lim f3aed11714 Update test name in WebFluxTagsTests
See gh-19976
5 years ago
Stephane Nicoll cb7e8cdbef Merge branch '2.2.x'
Closes gh-19904
5 years ago
Stephane Nicoll 99330325c0 Merge branch '2.1.x' into 2.2.x
Closes gh-19903
5 years ago
Stephane Nicoll 7fd8cce465 Polish "Close TomcatMetrics on shutdown for cleanup"
See gh-19880
5 years ago
Johnny Lim 51dfd528bd Close TomcatMetrics on shutdown for cleanup
See micrometer-metrics/micrometer#1424
See gh-19880
5 years ago
Phillip Webb 77bbe089b2 Update copyright year of changed files 5 years ago
Phillip Webb e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
5 years ago
Phillip Webb 0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
5 years ago
Stephane Nicoll 08967bca3e Merge branch '2.2.x'
Closes gh-19843
5 years ago
Stephane Nicoll 84324c438b Merge branch '2.1.x' into 2.2.x
Closes gh-19842
5 years ago
Stephane Nicoll 34c263a828 Polish actuator dependencies and test resources
This commit removes references of cache infra following the move to
Micrometer. We no longer ships an infinispan specific binder so the
dependency has been removed as well.

Closes gh-19838
5 years ago
dreis2211 991bcf5ce4 Revisit documentation that mentions Gradle "compile" configuration
See gh-19797
5 years ago
Scott Frederick 8f102aee68 Remove deprecated 2.2 code
See gh-19699
5 years ago
Scott Frederick 2e32cb2af1 Remove deprecated HealthIndicator and HealthAggregator 2.2 code
See gh-19699
5 years ago
Scott Frederick 1f1b06dfe2 Remove deprecated Actuator metrics 2.2 code
See gh-19699
5 years ago
Scott Frederick 7031a3b17d Remove deprecated logging properties
See gh-19699
5 years ago
Stephane Nicoll 421c464dd8 Deprecate CachingOperationInvoker#apply
This commit deprecates the only public accessor to
`CacheOperationInvoker` so that we can make the entire class package
private in the next feature release.

Closes gh-19089
5 years ago
Andy Wilkinson 443d1a6a21 Upgrade to Liquibase 3.8.5
Closes gh-19754
5 years ago
Andy Wilkinson 714a187d8f Rework dep mgmt again to avoid consumers picking up strict constraints
This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.

See gh-19609
5 years ago
Andy Wilkinson aefe52e4d0 Revert "Rework dep management to avoid consumers picking up strict constraints"
This reverts commit b34a311d02 as,
having disabled the publishing of Gradle's module metadata (4f75ab5),
the changes are no longer needed.

See gh-19609
5 years ago
Phillip Webb 862462b791 Update copyright year of changed files 5 years ago
Phillip Webb 1e5ba09a3e Merge branch '2.2.x' 5 years ago
Phillip Webb 15652ae4c1 Update copyright year of changed files 5 years ago
Madhura Bhave d1f51e064b Merge branch '2.2.x'
Closes gh-19701
5 years ago
Madhura Bhave e60194c7d5 Ignore trailing slash when recording Web metrics
Fixes gh-18207
5 years ago
Scott Frederick c789592e26 Remove support for deprecated Elasticsearch Jest client
Closes #19676
5 years ago
Andy Wilkinson b34a311d02 Rework dep management to avoid consumers picking up strict constraints
Previously, enforcedPlatform dependencies were using to pull in the
constraints defined in spring-boot-dependencies and
spring-boot-parent and applied them strictly so that the constrained
version had to be used. This worked as intended in Spring Boot's own
build but incorrectly enforced those same strict version requirements
on external consumers of Spring Boot's modules.

This commit reworks how Spring Boot defines its internal dependency
management so that platform dependencies are exposed to external
consumers while enforced platform dependencies are using internally.

See gh-19609
5 years ago
Stephane Nicoll ca1710ee56 Upgrade to Apache Cassandra 4.3.1
See gh-19588
5 years ago
Dmytro Nosan 25838b4794 Support nested requests in MetricsClientHttpRequestInterceptor
Prior to this commit, requests made by `HttpRequestInterceptor`
instances configured on `RestTemplate` would not be recorded
properly.

This commit ensures that nested requests are recorded separately.

See gh-19381
5 years ago
Andy Wilkinson 7595336184 Build against Spring Integration 5.3.0.M1 snapshots
See gh-19650
5 years ago
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
5 years ago
Madhura Bhave abe95fa8a7 Merge branch '2.2.x'
Closes gh-19600
5 years ago
Madhura Bhave 7f0573df49 Fallback on underlying server default when determining outcome tag
This commit also changed the default outcome to SUCCESS

Fixes gh-19367
5 years ago
Stephane Nicoll 7d6f4a6666 Merge branch '2.2.x'
Closes gh-19590
5 years ago
Stephane Nicoll 99c64b7cdf Merge branch '2.1.x' into 2.2.x
Closes gh-19589
5 years ago
Matthias Stock adfbbcc0f6 Simplify validation pattern of EndpointId
See gh-19584
5 years ago
Andy Wilkinson 4efd8ba587 Merge branch '2.2.x'
Closes gh-19574
5 years ago
Andy Wilkinson 02965e9744 Fix javadoc warnings
Fixes gh-19572
5 years ago
Stephane Nicoll 6fc52b0563 Polish 5 years ago
Stephane Nicoll 2c1e81adf0 Polish 5 years ago
Phillip Webb 695de2c6f5 Polish end-to-end configuration properties tracing
See gh-14880
5 years ago
Madhura Bhave 8dcf1e4033 Provide end-to-end traceability for config properties
Closes gh-14880

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
5 years ago
Stephane Nicoll 20bebdc07d Merge branch '2.2.x'
Closes gh-19331
5 years ago
dreis2211 b1158bf35d Simplify some Stream API usages
See gh-19291
5 years ago
Madhura Bhave b42bc1b23d Merge branch '2.2.x'
Closes gh-19314
5 years ago
Madhura Bhave ed571bab24 Merge branch '2.1.x' into 2.2.x
Closes gh-19313
5 years ago
dreis2211 20ff764756 Increase cache ttl in CachingOperationInvokerTests
See gh-19193
5 years ago
Andy Wilkinson ae5ec4e41a Merge branch '2.2.x'
Closes gh-19300
5 years ago
Andy Wilkinson 758b80a0fe Merge branch '2.1.x' into 2.2.x
Closes gh-19299
5 years ago
luoyuan c6a184474c Remove redundant hasText check as query always has text
See gh-19290
5 years ago
Madhura Bhave 0a2387ed0b Merge branch '2.2.x'
Closes gh-19279
5 years ago
Madhura Bhave 2c4a1f1c15 Display @Validated constructor bound properties in configprops endpoint
Fixes gh-19219
5 years ago
Andy Wilkinson b6fb251097 Merge branch '2.2.x'
Closes gh-19191
5 years ago
Andy Wilkinson 189f74220c Merge branch '2.1.x' into 2.2.x
Closes gh-19190
5 years ago
Andy Wilkinson e8eace2d5b Polish "Fix Liquibase endpoint's output with multiple datasources"
See gh-19171
5 years ago
Leo Li 5302d91930 Fix Liquibase endpoint's output with multiple datasources
Previously, the endpoint used the same change log history service for
for each SpringLiquibase bean that it processed. This resulted in
pollution of the reported changes as the history of each bean was not
isolated.

This commit updates the endpoint to use a new history service for each
SpringLiquibase bean that is processed.

See gh-19171
5 years ago
Stephane Nicoll 79201b61b6 Merge branch '2.2.x'
Closes gh-19158
5 years ago
Stephane Nicoll ce16c9e945 Merge branch '2.1.x' into 2.2.x
Closes gh-19157
5 years ago
Stephane Nicoll 2356462587 Polish "Remove '.' and '-' reference in the EndpointId javadoc"
See gh-19101
5 years ago
Lars Grefer 58e599b6c1 Remove '.' and '-' reference in the EndpointId javadoc
Endpoint ID's which contain '-' or '.' cause a deprecation warning.
Therefore they shouldn't be doumented as valid characters.

See gh-19101
5 years ago
dreis2211 8a730ff630 Use DateTimeFormatter in favor of SimpleDateFormat
See gh-19142
5 years ago
Stephane Nicoll 12c5cdceb1 Merge branch '2.2.x'
Closes gh-19104
5 years ago
thelproad 65ab82b3cd Remove redundant code
See gh-19000
5 years ago
dreis2211 21dc7e9ca3 Fix StepVerifier usage in HealthIndicatorReactiveAdapterTests 5 years ago
dreis2211 0bdcd2ee67 Handle ApiVersion in CachingOperationInvoker
Prior to this commit, ApiVersion was treated as a mandatory parameter in
CachingOperationInvokerAdvisor and thus prevented the
CachingOperationInvoker to kick in. By skipping ApiVersion in the same
way we're skipping SecurityContext we can avoid this.

In order to not return the same cached response, this commit also
changes the cache handling in CachingOperationInvoker to account for
different ApiVersions being passed.

See gh-18961
5 years ago
Madhura Bhave 6e22ddc1a6 Merge branch '2.1.x' into 2.2.x 5 years ago
Madhura Bhave 849a76c6c2 Polish 5 years ago
Madhura Bhave ff22bd4827 Merge branch '2.1.x' into 2.2.x
Closes gh-19059
5 years ago
Madhura Bhave a3a53d299f Check authorities when exposing health details
Fixes gh-18998
5 years ago
dreis2211 6b500d82b4 Polish
See gh-18918
5 years ago
Stephane Nicoll 86a1c96224 Make sure health endpoint is available with no contributor
This commit makes sure that the health endpoint returns a default health
status when no contributors are available. Previously, it was returning
`null` which leads to a 404 when exposed via HTTP.

Closes gh-18676
5 years ago
dreis2211 1b2112ea8c Reduce method visibility in EndpointDiscovererTests
See gh-18884
5 years ago
Andy Wilkinson ce01f7f150 Merge branch '2.1.x'
Closes gh-18882
5 years ago
Andy Wilkinson ed50bf2494 Honour EndpointFilter configured on an endpoint's superclass
Previously, @EndpointFilter would only have an effect when used as
an annotation or meta-annotation on the endpoint class itself. It
would have no effect when used on a super-class of the endpoint
bean's class.

This commit updates EndpointDiscoverer so that an @EndpointFilter
annotation or meta-annotation on a super-class will be found and
applied to the discovery process. This is achieved by using find…
rather than get… when retrieving the attributes for the EndpointFilter
annotation.

Fixes gh-17866
5 years ago
Phillip Webb b3e9a06476 Polish 5 years ago