730 Commits

Author SHA1 Message Date
Johnny Lim
b70be97cbf Polish
See gh-18281
2019-09-19 09:03:38 +02:00
Brian Clozel
ce2c26e934 Use Reactor's new Schedulers.boundedElastic()
Prior to this commit, Spring Boot would use `Schedulers.elastic()` when
required to process blocking tasks in a reactive environment.
reactor/reactor-core#1804 introduced a new scheduler,
`Schedulers.boundedElastic()` that behaves quite similarly but:

* will limit the number of workers thread
* will queue tasks if no worker thread is available and reject them is
the queue is exceeds a limit

This allows Spring Boot to schedule blocking tasks as before and allows
greater flexibility.

Fixes gh-18269
See gh-18276
2019-09-18 22:17:07 +02:00
Andy Wilkinson
b15e427a3e Improve handling of non-standard status codes in WebFluxTags
Closes gh-18267
2019-09-18 09:52:39 +01:00
Andy Wilkinson
1b237de5f5 Use Awaitility in our own tests
Closes gh-18227
2019-09-13 20:50:14 +01:00
wonwoo
b321dacc1c Fix typo in javadoc
See gh-18187
2019-09-09 15:22:21 +02:00
Andy Wilkinson
e8de5a6d95 Provide a public API for determining a request's outcome
Closes gh-18150
2019-09-05 20:54:35 +01:00
dreis2211
a2a672de0e Improve handling of non-standard status codes in WebMvcTags
See gh-17998
2019-09-05 20:34:25 +01:00
Andy Wilkinson
58eddb8fa4 Become compatible with Jackson 2.10 while remaining 2.9 compatible
See gh-17999
2019-09-05 17:13:45 +01:00
Phillip Webb
75a6397b52 Merge branch '2.1.x'
Closes gh-18110
2019-09-03 14:35:35 -07:00
Phillip Webb
e8d9b6f498 Polish "Fallback to ping if Solr URL references core"
See gh-16477
2019-09-03 14:20:17 -07:00
Markus Schuch
b9764e8de8 Fallback to ping if Solr URL references core
Update `SolrHealthIndicator` to fallback to a basic ping operation if
the `baseUrl` references a particular core rather than the root context.

Prior to this commit, if the Solr `baseUrl` pointed to a particular
core then the health indicator would incorrectly report `DOWN`.

See gh-16477
2019-09-03 14:03:25 -07:00
dreis2211
b4350a9d96 Remove unnecessary blank lines
See gh-18089
2019-09-03 08:48:10 +02:00
Andy Wilkinson
82ea3b51b3 Polish 2019-08-30 08:26:12 +01:00
Andy Wilkinson
0217de4349 Polish "Improve handling of non-standard status codes in RestTemplate metrics"
See gh-17991
2019-08-29 13:44:35 +01:00
Johnny Lim
1acff410a2 Improve handling of non-standard status codes in RestTemplate metrics
See gh-17991
2019-08-29 13:44:12 +01:00
Madhura Bhave
7829593746 Polish "Sanitize password in URI properties"
See gh-17939
2019-08-23 18:16:46 -07:00
HaiTao Zhang
d49a2ec98e Sanitize password in URI properties
See gh-17939
2019-08-23 18:10:43 -07:00
Andy Wilkinson
b54ff7c45f Merge branch '2.1.x'
Closes gh-17950
2019-08-23 20:34:35 +01:00
Andy Wilkinson
608228d617 Improve handling of non-standard status codes in WebClient metrics
Fixes gh-17695
2019-08-23 20:28:26 +01:00
Andy Wilkinson
b43827d626 Configure ping (formerly application) health indicator by default
This commit renames ApplicationHealthIndicator to PingHealthIndicator
and changes the auto-configuration so that it is now always configured
by default.

Closes gh-17926
2019-08-22 14:50:10 +01:00
Phillip Webb
e03f822c6d Add support for health indicator groups
Update the `HealthEndpoint` to support health groups. The
`HealthEndpointSettings` interface has been replaced with
`HealthEndpointGroups` which provides access to the primary group
as well as an optional set of additional groups.

Groups can be configured via properties and may have custom
`StatusAggregator` and `HttpCodeStatusMapper` settings.

Closes gh-14022

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-08-21 18:43:25 -07:00
Phillip Webb
3c535e0de3 Add HealthContributor and refactor HealthEndpoint
Overhaul `HealthEndpoint` support to make it easier to support health
groups. Prior to this commit the `HealthIndicator` interface was used
for both regular indicators and composite indicators. In addition the
`Health` result was used to both represent individual, system and
composite health. This design unfortunately means that all health
contributors need to be aware of the `HealthAggregator` and could not
easily support heath groups if per-group aggregation is required.

This commit reworks many aspects of the health support in order to
provide a cleaner separation between a `HealthIndicator`and a
composite. The following changes have been made:

- A `HealthContributor` interface has been introduced to represent
  the general concept of something that contributes health information.
  A contributor can either be a `HealthIndicator` or a
  `CompositeHealthContributor`.

- A `HealthComponent` class has been introduced to mirror the
  contributor arrangement. The component can be either
  `CompositeHealth` or `Health`.

- The `HealthAggregator` interface has been replaced with a more
  focused `StatusAggregator` interface which only deals with `Status`
  results.

- `CompositeHealthIndicator` has been replaced with
  `CompositeHealthContributor` which only provides access to other
  contributors. A composite can no longer directly return `Health`.

- `HealthIndicatorRegistry` has been replaced with
  `HealthContributorRegistry` and the default implementation now
  uses a copy-on-write strategy.

- `HealthEndpoint`, `HealthEndpointWebExtension` and
  `ReactiveHealthEndpointWebExtension` now extend a common
  `HealthEndpointSupport` class. They are now driven by a
  health contributor registry and `HealthEndpointSettings`.

- The `HealthStatusHttpMapper` class has been replaced by a
  `HttpCodeStatusMapper` interface.

- The `HealthWebEndpointResponseMapper` class has been replaced
  by a `HealthEndpointSettings` strategy. This allows us to move
  role related logic and `ShowDetails` to the auto-configure module.

- `SimpleHttpCodeStatusMapper` and `SimpleStatusAggregator`
  implementations have been added which are configured via constructor
  arguments rather than setters.

- Endpoint auto-configuration has been reworked and the
  `CompositeHealthIndicatorConfiguration` class has been replaced
  by `CompositeHealthContributorConfiguration`.

- The endpoint JSON has been changed make `details` distinct from
  `components`.

See gh-17926
2019-08-21 18:43:25 -07:00
Brian Clozel
e7c3ab3e27 Rename WebFlux response body methods
This commit adapts to recent changes in Spring Framework.
See spring-projects/spring-framework#23212
2019-08-20 13:03:24 +02:00
Andy Wilkinson
cc3df98135 Merge branch '2.1.x' 2019-08-19 16:08:25 +01:00
Andy Wilkinson
ab87b2a39b Polish 2019-08-19 16:05:43 +01:00
Stephane Nicoll
6f28f41774 Polish "Simplify some code"
See gh-17860
2019-08-14 08:55:20 +02:00
jason
4bb842343a Simplify some code
See gh-17860
2019-08-14 08:53:02 +02:00
lijuny
d8baefc38a Simplify some code
See gh-17834
2019-08-12 10:31:06 +02:00
lijuny
844a8d8027 Simplify some code
See gh-17832
2019-08-11 10:05:36 +02:00
Stephane Nicoll
71cf0a3ec8 Merge branch '2.1.x'
Closes gh-17812
2019-08-08 14:13:06 +02:00
Stephane Nicoll
994f08d234 Polish "Fix annotation lookup on proxied EndpointExtension"
See gh-17807
2019-08-08 13:58:03 +02:00
Jacques-Etienne Beaudet
9083da2876 Fix annotation lookup on proxied EndpointExtension
See gh-17807
2019-08-08 13:48:21 +02:00
Phillip Webb
105df823ee Polish 2019-08-03 15:42:22 +01:00
Phillip Webb
2cdceb92bf Polish 2019-08-03 14:29:20 +01:00
Phillip Webb
da4f436140 Change SearchStrategy EXHAUSTIVE to TYPE_HIERARCHY
Fixup references following upstream Spring Framework change.
2019-07-31 15:11:43 +01:00
Phillip Webb
890ea153bf Allow endpoint @Selector to capture all paths
Update `@Selector` with a `match` attribute that can be used to select
all remaining path segments. An endpoint method like this:

	 select(@Selector(match = Match.ALL_REMAINING) String... selection)

Will now have all reaming path segments injected into the `selection`
parameter.

Closes gh-17743
2019-07-31 12:44:46 +01:00
Madhura Bhave
61b86ff231 Polish "Add support for configuring logging groups"
See gh-17515

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
2019-07-30 11:28:58 -07:00
HaiTao Zhang
b9047c22e0 Add support for configuring logging groups via endpoint
See gh-17515
2019-07-30 11:13:07 -07:00
Stephane Nicoll
6756385049 Merge branch '2.1.x'
Closes gh-17664
2019-07-29 11:35:11 +02:00
Stephane Nicoll
6356852e2f Polish "Log health check failure with Reactive health indicators"
See gh-17635
2019-07-29 11:25:44 +02:00
Dmytro Nosan
fe1b9c9501 Log health check failure with Reactive health indicators
See gh-17635
2019-07-29 11:18:19 +02:00
dreis2211
eb9527a170 Fix deprecation warnings in spring-boot-actuator
See gh-17660
2019-07-28 15:22:37 +02:00
Phillip Webb
8bc780762a Merge branch '2.1.x' 2019-07-24 11:42:48 +01:00
Phillip Webb
fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 2019-07-24 11:41:32 +01:00
Phillip Webb
913e831f4e Merge '1.5.x' into 2.0.x 2019-07-24 11:39:58 +01:00
Phillip Webb
6c0dbacfce Polish 2019-07-23 15:43:51 +01:00
Stephane Nicoll
94c35ae1de Polish "Make Actuator dedicated ConversionService configurable"
See gh-16449
2019-07-23 12:27:00 +02:00
Stephane Nicoll
be988d7072 Polish "Add HealthIndicator for Hazelcast"
See gh-17499
2019-07-18 15:00:53 +02:00
Dmytro Nosan
fca5a2b824 Add HealthIndicator for Hazelcast
See gh-17499
2019-07-18 14:58:18 +02:00
Phillip Webb
a9ba7080ce Merge branch '2.1.x' 2019-07-17 21:48:42 +01:00