Commit Graph

1460 Commits (30815cc0e0ace7c849fc58c61a079545c9805fd5)

Author SHA1 Message Date
Andy Wilkinson db781a0d84 Merge branch '2.4.x'
See gh-25077
4 years ago
Andy Wilkinson 788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
4 years ago
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
4 years ago
Phillip Webb c9a2c4e326 Merge branch '2.4.x' 4 years ago
Andy Wilkinson 5a56f8864f Remove error message attribute instead of blanking it when not included
Closes gh-24712
4 years ago
Madhura Bhave d07e351eff Polish " Change info endpoint to be secure and unexposed by default"
See gh-24715
4 years ago
Hatef Palizgar 53c1e79810 Change info endpoint to be secure and unexposed by default
See gh-24715
4 years ago
Phillip Webb a196a9bd8f Merge branch '2.4.x'
Closes gh-24949
4 years ago
Phillip Webb 69fbd2f8aa Delegate `usesPathPatterns()` call to mappings
Update `CompositeHandlerMapping` so that the `usesPathPatterns()` method
returns `true` if any of the delegate mappings return `true`.

Closes gh-24877
4 years ago
Stephane Nicoll 012a199773 Remove Spring Data Solr support
In preparation to the upgrade to Spring Data 2021.0, this commit removes
auto-configuration for Spring Data Solr.

Closes gh-24939
4 years ago
Stephane Nicoll 3e376b955d Fix build failure
See gh-24943
4 years ago
Andy Wilkinson b095c7761a Polish "Add config prop for endpoints' CORS allowed origin patterns"
See gh-24680
4 years ago
Pedro Ivo Machado d7f891be39 Add config prop for endpoints' CORS allowed origin patterns
See gh-24680
4 years ago
Andy Wilkinson 4e918b141b Polish 4 years ago
Andy Wilkinson c6ce97b8a9 Disable all mappings endpoint infra when endpoint is unavailable
Previously, when the mappings endpoint was not available, the beans
that provide mapping descriptions were still created. This resulted
in unnecessary CPU and memory usage collecting and storing
information that would never by used.

This commit updates the auto-configuration for the mappings endpoint
so that all the beans that it creates are conditional on the endpoint
being available, rather than only the endpoint bean itself.

Closes gh-23977
4 years ago
Stephane Nicoll 2c2c160579 Remove deprecated code
See gh-24806
4 years ago
Stephane Nicoll a788ef4958 Merge branch '2.4.x'
Closes gh-24842
4 years ago
Stephane Nicoll 2072e7242a Merge branch '2.3.x' into 2.4.x
Closes gh-24841
4 years ago
Stephane Nicoll 283ed48d63 Unwrap Datasource against an actual interface
This commit updates DataSourceUnwrapper to take a separate interface
type argument if the target datasource has to be unwrapped, given that
the target type is usually not an interface.

Closes gh-24697
4 years ago
Phillip Webb 4cc1467aba Merge branch '2.4.x' 4 years ago
Phillip Webb a6a7c06e55 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 9da0bd8523 Update copyright year of changed files 4 years ago
Pascal Schumacher aa24f78d85 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
See gh-24734
4 years ago
Stephane Nicoll 632c1239e6 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
4 years ago
bono007 4b8d6efc12 Add support for GET requests for /actuator/startup
See gh-24717
4 years ago
Madhura Bhave b62325a056 Merge branch '2.4.x' 4 years ago
Madhura Bhave 86e94b95c3 Merge branch '2.3.x' into 2.4.x 4 years ago
Madhura Bhave 9928d74a9e Revert fix to enable cors for actuator endpoints
The fix causes a Jersey application to fail in the absence
of a `CorsFilter` or `CorsConfigurationSource` bean.

See gh-11987
4 years ago
Stephane Nicoll e4618cfb8d Delete ErrorProperties.IncludeStacktrace
Closes gh-21286
4 years ago
Stephane Nicoll 2c0bfb7674 Merge branch '2.3.x' into 2.4.x
Closes gh-24578
4 years ago
izeye 97dd4c0871 Polish
See gh-24558
4 years ago
Madhura Bhave 4822516fb7 Merge branch '2.3.x' into 2.4.x 4 years ago
Madhura Bhave 361198ebba Fix tests
See gh-11987
4 years ago
Madhura Bhave a1ea5b49ec Merge branch '2.3.x' into 2.4.x
Closes gh-24542
4 years ago
Madhura Bhave 09e07428cc Configure CORS in default security configuration for MVC
Fixes gh-11987
4 years ago
Phillip Webb 4fba7d0c60 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 29300530c6 Polish 4 years ago
Phillip Webb 72d36e0c07 Update copyright year of changed files 4 years ago
Phillip Webb e95c514661 Merge branch '2.3.x'
Closes gh-24412
4 years ago
Phillip Webb 49e754f48b Merge branch '2.2.x' into 2.3.x
Closes gh-24411
4 years ago
Phillip Webb cd5ff6e4af Merge branch '2.3.x'
Closes gh-24404
4 years ago
Phillip Webb 11f285bde5 Merge branch '2.2.x' into 2.3.x
Closes gh-24403
4 years ago
izeye 8c55803931 Polish
See gh-24306
4 years ago
Phillip Webb 30c27274e2 Merge branch '2.3.x'
Closes gh-24339
4 years ago
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
4 years ago
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
4 years ago
dreis2211 3e2d0c6d86 Remove deprecated ExposeExcludePropertyEndpointFilter
See gh-24323
4 years ago
Stephane Nicoll bd7e89be1a Start building against Spring Framework 5.3.2 snapshots
See gh-24278
4 years ago
Stephane Nicoll 065fde2996 Start building against Spring Framework 5.2.12 snapshots
See gh-24277
4 years ago
Stephane Nicoll 9763ba56ba Start building against Spring Framework 5.2.12 snapshots
See gh-24276
4 years ago
Andy Wilkinson 1f3012b466 Merge branch '2.3.x'
Closes gh-24220
4 years ago
Andy Wilkinson 0ed7f7f40a Merge branch '2.2.x' into 2.3.x
Closes gh-24219
4 years ago
Andy Wilkinson 08b9d1da57 Polish "Ensure that MeterRegistry bean is defined before SI looks for it"
See gh-24095
4 years ago
Artem Bilan 7d712aaa2d Ensure that MeterRegistry bean is defined before SI looks for it
Previously, it was possible for Spring Integration, including its
built-in Micrometer support, to be auto-configured before the
Micrometer auto-configuration had defined the MeterRegistry bean. This
resulted in missing Spring Integration metrics.

Spring Integration is unusual in having its own built-in Micrometer
support that it configures itself. Rather than providing
auto-configuration for Integration's Micrometer support (Which isn't
needed), this commit introduces some auto-configuration that just
affects the ordering of the auto-configuration classes. This ordering
ensures that the MeterRegistry bean has been defined by Spring
Integration is auto-configured. This ensures that the MeterRegistry
bean is known to the BeanFactory when Spring Integration goes looking
for it.

See gh-24095
4 years ago
Andy Wilkinson 699f03d5a6 Merge branch '2.3.x'
Closes gh-24010
4 years ago
Andy Wilkinson 2dce4aa42b Merge branch '2.2.x' into 2.3.x
Closes gh-24009
4 years ago
Andy Wilkinson 30a0ccab02 Remove use of `@PostConstruct` from main code
When running on Java 11 (where `@PostConstruct` is no longer part of
the JRE) and without a dependency on jakarta-annotation-api,
`@PostContruct` annotions are silently dropped. This leads to obscure and
hard-to-track down changes in the behaviour of our auto-configuration
as the `@PostConstruct`-annotated methods are not invoked.

To allow users to run on Java 11 without having jakarta-annotation-api
on the classpath, this commit removes use of `@PostConstruct` from main
code. A Checkstyle rule has also been added to prevent its usage in
main code from being reintroduced.

Closes gh-23723
4 years ago
Stephane Nicoll d951f28e16 Upgrade to Micrometer 1.6.0
Closes gh-23525
4 years ago
Andy Wilkinson b9516bc77c Await registration of http.server.requests meter
Previously, the test would make an HTTP request and, as soon as the
response was received, it would check the presence and value of the
http.server.requests meter. This create a race condition between the
meter being registered once the response had been flushed and the
meter's presence being checked. If the check won the race, the test
would fail.

This commit updates the test to wait for up to 5 seconds for the
meter to be present and have a count of 1, matching the single request
that has been made.

Fixes gh-23919
4 years ago
Phillip Webb ef89eb6dfb Add @ConditionalOnDefaultWebSecurity annotation
Add a dedicate condition annotation to detect when Spring Security is
available but has not been configured by the user. The new annotation
helps simplify quite a few of our auto-configuration classes.

See gh-23421
4 years ago
Madhura Bhave 0818f27f44 Configure WebSecurity using WebSecurityCustomizer
Replace `WebSecurityConfigurer` and `WebSecurityConfigurerAdapter`
configurations with `WebSecurityCustomizer` or `SecurityFilterChain`
beans.

Closes gh-23421
4 years ago
Andy Wilkinson abfdfc3e5f Merge branch '2.3.x'
Closes gh-23908
4 years ago
Andy Wilkinson c0bb6ff667 Await registration of http.server.requests meter
Previously, the test would make an HTTP request and, as soon as the
response was received, it would check the presence and value of the
http.server.requests meter. This create a race condition between the
meter being registered once the response had been flushed and the
meter's presence being checked. If the check won the race, the test
would fail.

This commit updates the test to wait for up to 5 seconds for the
meter to be present and have a count of 1, matching the single request
that has been made.

Fixes gh-23863
4 years ago
Andy Wilkinson 10f887a5ad Introduce management base-path property for servlet and reactive actuator
Previously, the base path of a servlet-based management server could be
configured using management.server.servlet.context-path but there was no
equivalent property for WebFlux.

This commit introduces a new property, management.server.base-path,
that can be used with both servlet and reactive management servers. The
existing servlet-specific property has been deprecated in favour of the
new general property. When using the servlet stack, if both the general
property and the servlet-specific property are set, the new general
property takes precedence. When using the reactive stack, only the new
general property is considered.

Closes gh-22906
4 years ago
Stephane Nicoll 9efff2af83 Merge branch '2.3.x'
Closes gh-23735
4 years ago
Stephane Nicoll f4e822f650 Prevent access to the EMF within the singleton lock
This commit makes sure to defer registration of hibernate statistics
outside of the singleton lock as it can lead to deadlocks when the
EntityManagerFactory is initialized in deferred mode.

Closes gh-23740
4 years ago
Stephane Nicoll b7a8b0f19b Hacking
See gh-23740
4 years ago
Andy Wilkinson 3f1f830efe Fail if management.server.address is set but actuator is on the same port
Closes gh-22187
4 years ago
Andy Wilkinson d005a64c9f Revert "Rename CompositeMeterRegistryAutoConfiguration"
This reverts commit 9460d74e8a.

Fixes gh-23724
4 years ago
Stephane Nicoll 34c4c3f235 Expose cache metrics for Redis
This commit adds support for Redis cache metrics. Users can opt-in for
statistics using the "spring.cache.redis.enable-statistics" property.

Closes gh-22701
4 years ago
Stephane Nicoll 35d41e4ae2 Remove code deprecated in Spring Boot 2.2
Closes gh-22034
4 years ago
dreis2211 ecee9c0f9b Avoid unnecessary explicit initialization of Atomics
Constructor calls like new AtomicInteger(0) cause a volatile write that
can be saved in cases where the constructor parameter is the default
value.

See gh-23575
4 years ago
Stephane Nicoll de32fab324 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
4 years ago
Stephane Nicoll 366fec33d0 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
4 years ago
Stephane Nicoll 4009acf025 Add support for Hazelcast
This commit upgrades to Hazelcast 4.0.3, yet keeping compatibility with
Hazelcast 3.x.

Closes gh-20856
Closes gh-23475
4 years ago
Andy Wilkinson 6d2deb89dd Polish 4 years ago
Andy Wilkinson 9f21413000 Stop applying MeterFilters to auto-configured composite registry
Previously, all MeterFilter beans were applied to all MeterRegistry
beans. As a result, when a composite registry was auto-configured, both
the composite and all of its delegates would have the same MeterFilters
applied. This made it impossible for one of the delegate registries to
have a locally-configured filter that would allow a meter that would be
denied by one of the MeterFilter beans applied to the composite.

This commit update MeterRegistryConfigurer to skips the auto-configured
composite meter registry when applying MeterFilter beans to
MeterRegistry beans. As a result, the composite's filters will no
longer deny a meter before it reaches a delegate that would have
accepted it due to one of its locally-configured filters.

Closes gh-23381
4 years ago
Phillip Webb c284edde67 Update copyright year of changed files 4 years ago
Andy Wilkinson 9d3c718bf3 Merge branch '2.3.x'
Closes gh-23306
4 years ago
Andy Wilkinson 53f2966b61 Merge branch '2.2.x' into 2.3.x
Closes gh-23305
4 years ago
Andy Wilkinson 5d20660c8a Disable proxyBeanMethods on all management context config classes
Fixes gh-23301
4 years ago
Stephane Nicoll f03ed3b2a7 Publish single page doc to /htmlsingle consistently
Closes gh-21585
4 years ago
Stephane Nicoll b9b7393053 Deprecate Cassandra health indicators that rely on Spring Data
With the introduction of health indicators that only require the
CqlSession, this commit deprecates the health indicators that require
Spring Data since the latter build on top of the former.

Closes gh-23226
4 years ago
Brian Clozel 8d27cac43e Polish
See gh-22358
4 years ago
Brian Clozel 1d73d4eda7 Remove Elasticsearch RestClient auto-configuration
Prior to this commit, Spring Boot would auto-configure both
Elasticsearch variants: `RestClient` ("Low Level" client) and
`RestHighLevelClient` ("High Level" client).
Since one can be derived from the other, this would create complex and
unclear situations depending on what developers provided with their
configuration.

`RestHighLevelClient` is mostly for actual use of the Elasticsearch API,
with support for specific methods and (de)serialization. On the other
hand, `RestClient` is merely wrapping the Apache HTTP client for
load-balancing support and low level HTTP features.

This commit completely removes the support for `RestClient` in Spring
Boot and now requires the presence of the
`org.elasticsearch.client:elasticsearch-rest-high-level-client`
dependency for REST client support with Elasticsearch.

Closes gh-22358
4 years ago
Brian Clozel 1152a39caa Polish 4 years ago
Brian Clozel 8dcb3312f2 Switch startup actuator endpoint to using HTTP POST
Closes gh-23213
4 years ago
Brian Clozel 676e1809fb Add startup Actuator endpoint
This commit builds on top of gh-22603 and exposes data collected by the
`BufferingApplicationStartup` on a dedicated `"/startup"` Actuator
endpoint.

Closes gh-23213
4 years ago
Stephane Nicoll f8bc656921 Polish "Removed some redundant 'else's using early return"
See gh-22528
4 years ago
Pradipta Sarma 2627bf896e Removed some redundant 'else's using early return
See gh-22528
4 years ago
Andy Wilkinson 627ede8bff Remove duplicate jackson-datatype-jsr310 dependency
Closes gh-23123
4 years ago
Phillip Webb aa2580bb51 Merge branch '2.3.x' 4 years ago
Phillip Webb ba2ab3363b Merge branch '2.2.x' into 2.3.x 4 years ago
Phillip Webb 60b5de192c Merge branch '2.2.x' into 2.3.x 4 years ago
Phillip Webb 4e76138ebc Update copyright year of changed files 4 years ago
Phillip Webb 9460d74e8a Rename CompositeMeterRegistryAutoConfiguration
Rename `CompositeMeterRegistryAutoConfiguration` to
`MeterRegistryAutoConfiguration` since it can also create non-composite
registries.

Closes gh-22988
4 years ago
Phillip Webb 12bae2ad52 Merge branch '2.3.x'
Closes gh-22990
4 years ago
Phillip Webb ff36f8bab8 Merge branch '2.2.x' into 2.3.x
Closes gh-22989
4 years ago
Phillip Webb 10da595302 Polish 'Order metrics auto-configurations correctly'
See gh-21134
4 years ago
Martin Benda 02b7ec787e Order metrics auto-configurations correctly
Update metrics auto-configurations so that they are auto-configured
after `CompositeMeterRegistryAutoConfiguration` in order to ensure
the `MeterRegistry` bean has been defined.

Prior to this commit, metrics auto-configurations that depended on a
`MeterRegistry` has `@AutoConfigureAfter(MetricsAutoConfiguration.class)`
which is not sufficient since `MetricsAutoConfiguration` does not export
a `MeterRegistry`.

See gh-21134
4 years ago
Madhura Bhave bbbbe8e4d2 Make security auto-configs back off when SecurityFilterChain present
Closes gh-22739
4 years ago
Stephane Nicoll 42ca62b2e7 Merge branch '2.3.x'
Closes gh-22931
4 years ago
Stephane Nicoll df78105a3c Merge branch '2.2.x' into 2.3.x
Closes gh-22930
4 years ago
Stephane Nicoll f61a632a37 Polish "Fix conditions that lead to auto-configure PushGateway"
See gh-22919
4 years ago
smlc c355b95f6c Fix conditions that lead to auto-configure PushGateway
See gh-22919
4 years ago
Stephane Nicoll 14eb041086 Polish "Add basic auth support for Prometheus pushgateway"
See gh-22548
4 years ago
AndrewDi 9ddc97f815 Add basic auth support for Prometheus pushgateway
See gh-22548
4 years ago
Andy Wilkinson e358144b2e Polish "Exclude cookie headers by default from HTTP traces"
See gh-22829
4 years ago
Emily Tsanova 5ff515727d Exclude cookie headers by default from HTTP traces
See gh-22829
4 years ago
Andy Wilkinson abf6123bae Upgrade to Kafka 2.5.1
Closes gh-22868
4 years ago
Andy Wilkinson 969dd35e45 Upgrade to Mockito 3.4.6
Closes gh-22838
4 years ago
Andy Wilkinson 0ffe51bb62 Merge branch '2.3.x'
Closes gh-22820
4 years ago
Andy Wilkinson be32843dab Configure generated snippets as inputs to the Asciidoctor tasks
Closes gh-22819
4 years ago
Madhura Bhave 6d82e9e97f Merge branch '2.3.x'
Closes gh-22775
4 years ago
Madhura Bhave 3f82ca40e2 Merge branch '2.2.x' into 2.3.x
Closes gh-22774
4 years ago
Madhura Bhave f39f33bb8d Fix documentation related to the health endpoint's inner details
Closes gh-22490
4 years ago
Phillip Webb f7f4ff0ac9 Update copyright year of changed files 4 years ago
Stephane Nicoll dac63fc3e5 Polish 4 years ago
Andy Wilkinson 0e83b2f4c4 Merge branch '2.3.x'
Closes gh-22747
4 years ago
Andy Wilkinson c40835eba0 Merge branch '2.2.x' into 2.3.x
Closes gh-22746
4 years ago
Andy Wilkinson 71ffb44a3c Remove WebClient's in-memory buffer size limit for endpoint tests
Previously, the endpoints' responses could occasionally exceed
WebClient's in-memory buffer limt, for example if the threads endpoint
was reporting a large number of threads or the threads had large
stacks.

This commit disables WebClient's in-memory buffer size limit so that
the tests passing is not dependent on the size of the endpoints'
responses.

Closes gh-22743
4 years ago
Stephane Nicoll 516582f6d3 Merge branch '2.3.x'
Closes gh-22744
4 years ago
Andy Wilkinson bc44cd6705 Polish 4 years ago
Andy Wilkinson 7f53aef568 Upgrade to Kafka 2.6.0
Closes gh-22731
4 years ago
Brian Clozel fb1234a22c Upgrade to Reactor 2020.0.0 SNAPSHOTs
See gh-22667
4 years ago
Brian Clozel 6efff7b585 Merge branch '2.3.x'
Closes gh-22698
4 years ago
Brian Clozel 8dedeb4c6a Fix missing liveness and readiness indicators
Prior to this commit, the livenessState and readinessState health
indicators would not be configured automatically and would be missing
from the "liveness" and "readiness" health groups, leading to 404s when
hitting the `/actuator/health/liveness` or `/actuator/health/readiness`.

This commit ensures that the health indicators beans have the proper
name and revisits the auto-configuration conditions to reflect that as
well.

Fixes gh-22562
4 years ago
Madhura Bhave 4b2c94cb2b Allow exclude only health groups
Closes gh-22053
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 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
Andy Wilkinson ce7210c4f0 Merge branch '2.1.x' into 2.2.x
Closes gh-22563
4 years ago
Nelson Osacky 585aed8f8f Add generated-snippets as output to test goal
The generated snippets were not declared as an output to the
`spring-boot-actuator-autoconfigure` test goal so when the test was
pulled from the cache, it did not contain the `generated-snippets`
directory. This directory is required as an input to the Asciidoctor
plugin.

See gh-22555
4 years ago
Stephane Nicoll 42155321cb Merge branch '2.3.x'
Closes gh-22561
4 years ago
Stephane Nicoll 7ed54bda96 Fix typo for management.health.readinessstate.enabled
Closes gh-22560
4 years ago
Stephane Nicoll 3530ac9b0c Polish "Disable metrics export in integration tests"
See gh-21658
4 years ago
bono007 b1830da0da Disable metrics export in integration tests
This commit introduces a new property to globally disable metrics
export. In integration tests, this property is automatically set to
disable everything but in-memory metrics.

This commit also introduces a `@AutoConfigureMetrics` annotation that
can be used for integration tests that require metrics export to operate
as they would in an application.

See gh-21658
4 years ago
Phillip Webb 3d7d9d064c Update copyright year of changed files 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 8799033801 Merge branch '2.3.x' 4 years ago
Andy Wilkinson 2063c242ae Polish 4 years ago
Brian Clozel 1d95e2f504 Merge branch '2.3.x'
Closes gh-22483
4 years ago
Brian Clozel fe807d6c0b Improve liveness/readiness health config
Prior to this commit, the application availability infrastructure
would mix the `AvailabilityState`, the `HealthIndicator` and the
`HealthGroup` concepts and would not align with the rest.

This commit auto-configures the livenessState and readinessState
health indicators with the relevant configuration properties.
Unlike other indicators, they are not enabled by default but might
be in future versions.

This also moves the `management.health.probes.enabled` property
to `management.endpoint.health.probes.enabled` since "probes" here
is not a health indicator but rather a configuration flag for the
health endpoint.

Finally, the probes auto-configuration is refined to automatically
add liveness and readiness indicators for the probes group if
they're not already present.

Closes gh-22107
4 years ago
Andy Wilkinson b627918011 Polish "Optionally ignore routing data sources when creating DB health indicators"
See gh-22222
4 years ago
Julio Gomez Diaz 13d1d2393d Optionally ignore routing data sources when creating DB health indicators
See gh-22222
4 years ago
Andy Wilkinson b356bc830d Merge branch '2.3.x' 4 years ago
Andy Wilkinson dfea2f432a Polish
See gh-21921
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 d85774ea77 Merge branch '2.3.x'
Closes gh-22196
4 years ago
Eddú Meléndez 54e0a61b42 Reinstate metrics for Kafka Streams
See gh-21921
4 years ago
Andy Wilkinson 77eb5f7794 Polish "Add StatsD transport protocol configuration option"
See gh-22125
4 years ago
Lee Dobryden 5d41f60e45 Add StatsD transport protocol configuration option
See gh-22125
4 years ago
Phillip Webb efe84356b7 Merge branch '2.3.x'
Closes gh-22064
4 years ago
Phillip Webb 03b0a373ab Merge branch '2.2.x' into 2.3.x
Closes gh-22063
4 years ago
Phillip Webb e6eb02603c Polish 'Inherit show-details property in health groups'
Rework the inheritance so that the property metadata JSON more
accurately reflects the default value.

See gh-22022
4 years ago
Leo Li 10de88884f Inherit show-details property in health groups
Update `Group` properties so that the `showDetails` value does not
inherit `Show.NEVER`. Prior to this commit, the `Group` properties
would not correctly inherit a `showDetails` value from the main
`management.endpoint.health.show-details` property.

See gh-22022
4 years ago
Andy Wilkinson 9e08490522 Merge branch 'gh-21271'
Closes gh-21271
4 years ago
Andy Wilkinson 753bea64c6 Enable varargs compilation warnings
See 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 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 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
Scott Frederick 9ae6816785 Merge branch '2.3.x'
Closes gh-21874
5 years ago
Scott Frederick 7a793a11fb Merge branch '2.2.x' into 2.3.x
Fixes gh-21036 in 2.3.1
5 years ago
Scott Frederick 0fa1d0ef2e Handle bind exceptions in management context
This commit updates the logic for handling binding exceptions in the
management context when it is separate from the application context.
The changes allow the exception details to be visible to
DefaultErrorAttributes without causing the servlet container to
detect an error condition.

Fixes gh-21036
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
Stephane Nicoll da5e8d70a1 Polish "Support filtered scrape for Prometheus"
See gh-21545
5 years ago
Johnny Lim cd1baf18fe Support filtered scrape for Prometheus
See gh-21545
5 years ago
Andy Wilkinson 24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
5 years ago
Andy Wilkinson daeca9f332 Restore Boot 2.2's compile-scoped dependencies
Fixes gh-21507
5 years ago
Madhura Bhave d3f72326d0 Merge branch '2.2.x' into 2.3.x
Closes gh-21642
5 years ago
Madhura Bhave 573cb98d90 Make management security configuration back off when SAML present
Fixes gh-21620
5 years ago
Stephane Nicoll 069c31a074 Map connection and read timeouts for New Relic again
Closes gh-21440
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
Phillip Webb 12381467da Polish 5 years ago
Phillip Webb 6a1f61c1bf Merge branch '2.2.x' 5 years ago
Phillip Webb 5157a75119 Polish 5 years ago
Stephane Nicoll 23c5549832 Polish 5 years ago
Andy Wilkinson a03426af57 Configure the Asciidoctor revnumber in a central location
See gh-20934
5 years ago
Madhura Bhave 376098d080 Set asciidoctor revnumber to null
Closes gh-20934
5 years ago
Scott Frederick 0d00947735 Closes gh-21428 5 years ago
Scott Frederick 6b8d08a6e3 Handle exceptions in management context
Prior to this commit, details about an exception would get dropped when
the management context was separate from the application context and
an actuator endpoint threw a binding exception.

This commit adds some logic to capture the exception so the management
context error handlers can add the appropriate attributes to the error
response.

Fixes gh-21036
5 years ago
Scott Frederick 158933c3e5 Improve API of ErrorAttributes and DefaultErrorAttributes
This commit improves the backward-compatibility of the ErrorAttributes
interfaces by providing a default implementation of a new method. It
also encapsulates several parameters that control the inclusion or
exclusion of error attributes into a new ErrorAttributeOptions type to
make it easier and less intrusive to add additional options in the
future. This encapsulation also makes the handling of the
includeException option more similar to other options.

Fixes gh-21324
5 years ago
Andy Wilkinson f6d8c7d23c Simplify ReactiveWebServerApplicationContext.ServerManager
Closes gh-21315
5 years ago
Phillip Webb d52bf83ab2 Polish 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 d16074d8fd Bind and unbind Kafka metrics as consumers and producers come and go
Fixes gh-21008

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
5 years ago
dreis2211 c1c90b11b8 Fix some deprecations
See gh-21212
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
Brian Clozel dfdee3e00e Revert "Add support for Reactor Netty Micrometer metrics"
This commit removes the support for Reactor Netty metrics since it
seems that Spring Boot should not use this feature:

* HTTP metrics are already covered by WebFlux
* TCP metrics are only meant to TCP server/clients
* allocator metrics are already provided by Netty and there is
no specific API to enable them here.

Closes gh-19388
5 years ago
Brian Clozel 956afdcf97 Add support for Reactor Netty Micrometer metrics
This commit enables the production of TCP and buffer allocator metrics
for Reactor Netty, client and server.

When applications use auto-configured server
(`NettyReactiveWebServerFactory`) and client (through
`WebClient.Builder`) instances, metrics will be enabled.

Note that HTTP metrics are not enabled here, since similar metrics are
already produced at the WebFlux level. Also, to avoid cardinality
explosion of metrics (through the URI tag), Reactor Netty offers
configurable infrastructure to deduplicate URI tags by turning expanded
URI instances into templated URIs. This is not targeted for Spring
usage.

Closes gh-19388
5 years ago