Commit Graph

1329 Commits (5863edfdda1b572c8e5e25ae20792898cca79f21)

Author SHA1 Message Date
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