Commit Graph

6577 Commits

Author SHA1 Message Date
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
Andy Wilkinson 24b5b0d93e Polish 2019-08-21 15:50:33 +01:00
Andy Wilkinson 87339405f3 Merge branch '2.1.x'
Closes gh-17928
2019-08-21 15:18:13 +01:00
Andy Wilkinson abe3d38527 Fix OoM error when starting Tomcat with max int load on startup
Fixes gh-17927
2019-08-21 15:17:54 +01:00
dreis2211 6ef6875a60 Correct WebFlux response body method
See gh-17919
2019-08-21 11:07:48 +01:00
Andy Wilkinson 9ac6485768 Prioritise static resource locations over classpath for favicon.ico
Closes gh-17922
2019-08-21 10:42:32 +01:00
Madhura Bhave 55c6ee71c1 Include logger group with configuredLevel in docs
Closes gh-17772
2019-08-20 22:48:26 -07:00
Phillip Webb 5f88c592b3 Polish 2019-08-20 19:27:43 -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
Stephane Nicoll 752bb0f5ab Start building against Spring Kafka 2.3.0 snapshots
See gh-17902
2019-08-20 10:46:00 +02:00
Stephane Nicoll 9dd6edbe56 Start building against Spring Integration 5.2.0 snapshots
See gh-17901
2019-08-20 10:45:20 +02:00
Stephane Nicoll b2e024f22e Start building against Spring HATEOAS 1.0.0 snapshots
See gh-17904
2019-08-20 10:44:32 +02:00
Stephane Nicoll e984874e96 Start building against Spring Data Moore snapshots
See gh-17900
2019-08-20 10:44:32 +02:00
Stephane Nicoll 3c0a41646b Start building against Spring Batch 4.2.0 snapshots
See gh-17899
2019-08-20 10:44:27 +02:00
Stephane Nicoll 4b6e3b2a59 Start building against Reactor Dysprosium snapshots
See gh-17895
2019-08-20 10:01:31 +02:00
Andy Wilkinson e805b6ea6e Upgrade to Mockito 3.0.0
Closes gh-17803
2019-08-19 18:25:07 +01:00
Andy Wilkinson 7f8944d00f Polish 2019-08-19 17:31:56 +01: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
Andy Wilkinson f916e1a1ce Document response structure for retrieving a logger group
Closes gh-17909
2019-08-19 14:18:41 +01:00
Stephane Nicoll 3bc65f4fec Upgrade to Kotlin coroutines 1.3.0-RC2
See gh-17907
2019-08-19 11:30:08 +02:00
Stephane Nicoll a43e4c7a21 Start building against Spring Framework 5.2.0 snapshots
See gh-17896
2019-08-19 11:27:22 +02:00
Stephane Nicoll 7f06504006 Detect ConfigurationProperties using autowiring constructor
This commit improves InvalidConfigurationPropertiesException failure
analysis by adding a dedicated description when a single autowiring
constructor is found. When @Component is removed, such constructor is
used for properties binding and will not apply the same semantics as
before.

Closes gh-17750
2019-08-19 11:01:49 +02:00
LiangYong a5746d0a03 Simplify some code
See gh-17893
2019-08-19 07:24:54 +02:00
thelproad 9c1f503e46 Simplify if statements
See gh-17884
2019-08-17 06:50:32 +02:00
Stephane Nicoll fc0cee5ea7 Merge branch '2.1.x' 2019-08-17 06:47:33 +02:00
lijuny d33ed84f1f Remove redundant code
See gh-17875
2019-08-17 06:41:10 +02:00
dreis2211 d4affd7f85 Use hasSize() assertion in favor of length checks
See gh-17874
2019-08-17 06:39:41 +02:00
Stephane Nicoll 04b63cda8f Merge branch '2.1.x'
Closes gh-17889
2019-08-17 06:38:00 +02:00
Filip Hrisafov 1ebbe9fc55 Map non-null LDAP properties
The userDn and password in LdapContextSource are not nullable. The
default values for userDn and password in LdapProperties are null. When
the values are set to null there will eventually be a
NullPointerException during
AbstractContextSource#setupAuthenticatedEnvironment since HashTable
doesn't allow null for values.

See gh-17861
2019-08-17 06:34:22 +02:00
Madhura Bhave 76dfe1aae4 Merge branch '2.1.x'
Closes gh-17887
2019-08-16 16:53:42 -07:00
Madhura Bhave 0187e5106d Polish "Set up SpringLiquibase beans' dependencies by type rather than name"
See gh-17805
2019-08-16 16:43:50 -07:00
Andrii Hrytsiuk b69f9e9fdf Add missing javadoc
See gh-17805
2019-08-16 16:05:33 -07:00
Andrii Hrytsiuk eaad22dd89 Set up SpringLiquibase beans' dependencies by type rather than name
See gh-17805
2019-08-16 16:05:33 -07:00
Madhura Bhave dab815af40 Simplify mockmvc security in tests following upstream changes
SecurityMockMvcConfigurer now honors filter order so we can use that instead
of manually adding the filter.
2019-08-16 10:51:57 -07:00
Andy Wilkinson a785a5b58a Test the Gradle Plugin against Gradle 5.6
Closes gh-17883
2019-08-16 08:46:48 +01:00
dreis2211 56940fca97 Test the Gradle Plugin against Gradle 5.6
See gh-17876
2019-08-16 08:45:33 +01:00
Madhura Bhave 64e8b1d47c Polish "Add properties for Jetty threadpool"
See gh-17871
2019-08-15 18:31:12 -07:00
HaiTao Zhang 1024d74742 Add properties for Jetty threadpool
See gh-17871
2019-08-15 18:30:57 -07:00
Madhura Bhave 09b690b3c9 Fix tests 2019-08-15 17:53:19 -07:00
Madhura Bhave 7494a2baad Merge branch '2.1.x'
Closes gh-17880
2019-08-15 15:15:50 -07:00
Madhura Bhave 8d7deb7b67 Polish "Expand documentation on remote devtools"
See gh-17780
2019-08-15 15:11:10 -07:00
Sergei Petunin ab33bc7deb Expand documentation on remote devtools
See gh-17780
2019-08-15 15:09:43 -07:00
Madhura Bhave eea83e935e Resolve httpstatus error series using raw int code
See gh-16691
2019-08-15 10:44:46 -07:00
Madhura Bhave 186530478c Bypass Spring security authentication for remote devtools endpoint
Closes gh-17878
2019-08-15 10:34:53 -07:00
Madhura Bhave 4b4dc28a86 Support non-standard error codes with AbstractErrorWebExceptionHandler
Fixes gh-16691
2019-08-15 08:21:04 -07:00
lijuny 64344214e1 Delete redundant variables
See gh-17864
2019-08-15 07:05:10 +02:00
Andy Wilkinson ba4c5be2fd Remove unused field
See gh-17562
2019-08-14 19:41:14 +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 b26f887a2e Simplify some code
See gh-17852
2019-08-14 08:48:16 +02:00
lijuny 200de49c11 Replace Collection#addAll to call constructor
See gh-17847
2019-08-14 08:42:13 +02:00
周武栋 6fab5b591b Simplify some code
See gh-17837
2019-08-14 08:36:17 +02:00
Madhura Bhave 468b2e6d57 Merge branch '2.1.x'
Closes gh-17857
2019-08-13 15:15:14 -07:00
Madhura Bhave 3515ec1f29 Support relaxed binding for properties before environment is prepared
Fixes gh-17843
2019-08-13 14:54:27 -07:00
Stephane Nicoll 704992e657 Merge branch '2.1.x'
Closes gh-17855
2019-08-13 17:36:14 +02:00
Stephane Nicoll fcf4680626 Polish "Document how to add metadata for collection and enum default values"
Closes gh-12874
2019-08-13 17:35:37 +02:00
Stephane Nicoll ccf9b1b934 Merge branch '2.1.x'
Closes gh-17854
2019-08-13 17:23:07 +02:00
Stephane Nicoll 7aea432e3e Promote dependency management plugin version to the bom
Closes gh-17842
2019-08-13 17:21:32 +02:00
Stephane Nicoll 463f94930c Merge branch '2.1.x'
Closes gh-17850
2019-08-13 09:22:05 +02:00
Stephane Nicoll 25aecfeb35 Upgrade to Jackson 2.9.9.20190807
Closes gh-17698
2019-08-13 09:21:14 +02:00
Madhura Bhave 178746d678 Update Opaque Token Client Name following upstream changes
Closes gh-17846
2019-08-12 18:38:27 -07:00
Madhura Bhave c178c9dd47 Merge branch '2.1.x' 2019-08-12 17:30:47 -07:00
Madhura Bhave 38d36ab18d Document how to add metadata for collection and enum default values
Closes gh-12874
2019-08-12 17:26:39 -07:00
Brian Clozel 16f798dc11 Apply RSocket transport configuration on server
Fixes gh-17845
2019-08-12 21:11:59 +02:00
Stephane Nicoll 2059147421 Merge branch '2.1.x'
Closes gh-17840
2019-08-12 11:04:56 +02:00
Stephane Nicoll 56c2a52ea4 Polish "Fix syntax errors in docs"
Closes gh-17835
2019-08-12 10:54:33 +02:00
Stephane Nicoll d02000ecc0 Merge branch '2.1.x'
Closes gh-17840
2019-08-12 10:36:06 +02:00
dreis2211 2e32af4737 Fix syntax errors in docs
See gh-17835
2019-08-12 10:34:46 +02:00
lijuny d8baefc38a Simplify some code
See gh-17834
2019-08-12 10:31:06 +02:00
dreis2211 b605cddb10 Polish some Collections API calls
See gh-17825
2019-08-11 10:36:10 +02:00
zhuzhuman 84eacc49ed Simplify for statement with Collection copy
See gh-17827
2019-08-11 10:34:11 +02:00
lijuny 844a8d8027 Simplify some code
See gh-17832
2019-08-11 10:05:36 +02:00
Madhura Bhave 835108e522 Support binding of YAML style true/false values to 'ON'/'OFF'.
Fixes gh-17798
2019-08-09 16:19:15 -07:00
Stephane Nicoll 4928e958ce Add reference to Pebble Templates to 3rd party starter list
Closes gh-17822
2019-08-09 09:28:23 +02:00
Stephane Nicoll bf88149fb9 Upgrade to Couchbase Client 2.7.9
Closes gh-17795
2019-08-09 09:16:59 +02:00
Madhura Bhave 4208be0154 Merge branch '2.1.x'
Closes gh-17818
2019-08-08 16:26:53 -07:00
Madhura Bhave 47a9bb1c0e Document that auto-configuration classes are not public API
Closes gh-16704
2019-08-08 16:26:04 -07:00
Madhura Bhave 7997971b0e Merge branch '2.1.x'
Closes gh-17815
2019-08-08 15:16:20 -07:00
Madhura Bhave 1b62a05c40 Document Prometheus Pushgateway support
Closes gh-16853
2019-08-08 15:15:51 -07:00
Madhura Bhave 8a9c60a29a Merge branch '2.1.x' 2019-08-08 11:52:50 -07:00
Madhura Bhave 541d3c4853 Fix typo 2019-08-08 11:52:05 -07:00
Stephane Nicoll 07cd67a3fe Tolerate null startTime
This commit prevents a potential NPE if the startTime of the
MavenSession is not available and fallbacks to the current time. This
can happen when invoking the plugin with Maven embedded in an IDE.

Closes gh-17810
2019-08-08 17:32:04 +02:00
Stephane Nicoll b8a1043e98 Merge branch '2.1.x'
Closes gh-17813
2019-08-08 16:33:31 +02:00
Stephane Nicoll 1b3a6d1616 Polish "Configure a temporary directory with Undertow"
See gh-17778
2019-08-08 16:29:43 +02:00
Andy Chen 0388f954af Configure a temporary directory with Undertow
See gh-17778
2019-08-08 16:17:34 +02:00
Stephane Nicoll 1c8f727864 Polish "Simplify if statements"
See gh-17785
2019-08-08 14:35:29 +02:00
SaberXu c6c3a91f8d Simplify if statements
See gh-17785
2019-08-08 14:32:37 +02:00
Vedran Pavic 85a289f71a Harmonize Spring Session flush mode properties javadoc
See gh-17797
2019-08-08 14:29:30 +02:00
Vedran Pavic 84dd1f2d29 Add support for configuring Spring Session JDBC flush mode
See gh-17797
2019-08-08 14:27:15 +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
Stephane Nicoll 845f2d0607 Upgrade to Rsocket 1.0.0-RC2
Closes gh-17800
2019-08-07 08:50:40 +02:00
Stephane Nicoll b8a8df4118 Revert "Upgrade to Jackson 2.9.9.20190806"
This reverts commit 81239611a0.

See gh-17698
2019-08-06 11:07:21 +02:00
Stephane Nicoll 81239611a0 Upgrade to Jackson 2.9.9.20190806
Closes gh-17698
2019-08-06 09:40:32 +02:00
Stephane Nicoll 94184ae38b Upgrade to Spring Security 5.1.6
Closes gh-17794
2019-08-06 08:15:18 +02:00
Madhura Bhave 3c9774d73c Upgrade to Spring Integration 5.2.0.M4
Closes gh-17584
2019-08-05 17:02:48 -07:00
Madhura Bhave c5d1781ae1 Merge branch '2.1.x'
Closes gh-17793
2019-08-05 15:32:47 -07:00
陈其苗 77931a0981 Fix typo in assertion
See gh-17774
2019-08-05 15:30:33 -07:00
Bo Zhang c19057e117 Simplify conditional statements
See gh-17779
2019-08-05 15:13:35 -07:00
Madhura Bhave 4002a66c8b Upgrade to Spring Session Corn-M3
Closes gh-17348
2019-08-05 14:17:40 -07:00
Stephane Nicoll 602bf730f2 Upgrade to Webjars Locator Core 0.38
Closes gh-17792
2019-08-05 20:43:08 +02:00
Stephane Nicoll 60bb9e695b Upgrade to Mariadb 2.4.3
Closes gh-17791
2019-08-05 20:43:08 +02:00
Stephane Nicoll 9226edf19b Upgrade to Elasticsearch 6.8.2
Closes gh-17790
2019-08-05 20:43:08 +02:00
Stephane Nicoll 5ace0e5e0c Upgrade to Johnzon Jsonb 1.1.13
Closes gh-17789
2019-08-05 20:43:08 +02:00
Stephane Nicoll 6a4fb6fcde Upgrade to Rxjava2 2.2.11
Closes gh-17788
2019-08-05 20:43:08 +02:00
Stephane Nicoll 7874de4062 Restore tests that were failing with Java 13
Closes gh-17607
2019-08-05 20:43:08 +02:00
Stephane Nicoll 9a16a505ec Upgrade to Hazelcast 3.12.2
Closes gh-17787
2019-08-05 20:43:08 +02:00
Madhura Bhave e6dd6a3df8 Upgrade to Spring Security 5.2.0.M4
Closes gh-17349
2019-08-05 11:31:42 -07:00
Stephane Nicoll 7a3a66e43d Upgrade to Spring Kafka 2.3.0.M4
Closes gh-17319
2019-08-05 20:15:11 +02:00
Stephane Nicoll 41e19a8298 Upgrade to Spring AMQP 2.2.0 M4
Closes gh-17583
2019-08-05 20:14:22 +02:00
Stephane Nicoll 766b6c394f Upgrade to Rxjava2 2.2.11
Closes gh-17675
2019-08-05 20:01:56 +02:00
Stephane Nicoll b1d298fdef Upgrade to Johnzon Jsonb 1.1.13
Closes gh-17786
2019-08-05 20:00:43 +02:00
Madhura Bhave 5e52fedbac Upgrade to Spring Session Bean-SR7
Closes gh-17581
2019-08-05 09:49:27 -07:00
Stephane Nicoll 134c534cc1 Upgrade to Spring Kafka 2.2.8
Closes gh-17645
2019-08-05 18:13:28 +02:00
Stephane Nicoll 1e74e294ae Upgrade to Spring AMQP 2.1.8
Closes gh-17641
2019-08-05 18:12:49 +02:00
Stephane Nicoll 236efd2cf4 Upgrade to Spring Integration 5.1.7
Closes gh-17643
2019-08-05 18:12:17 +02:00
Stephane Nicoll 501d9ad628 Upgrade to Spring Data Moore-RC2
Closes gh-17350
2019-08-05 16:36:29 +02:00
Stephane Nicoll aaf953338b Upgrade to Spring HATEOAS 1.0.0.RC1
Closes gh-17755
2019-08-05 16:35:50 +02:00
Stephane Nicoll 854d6081c6 Upgrade to Byte Buddy 1.10.0
Closes gh-17716
2019-08-05 14:17:48 +02:00
Stephane Nicoll 9938c18968 Upgrade to Spring Data Lovelace-SR10
Closes gh-17353
2019-08-05 13:42:48 +02:00
Stephane Nicoll 5529596e17 Upgrade to Spring Framework 5.2.0 RC1
Closes gh-17280
2019-08-05 11:36:36 +02:00
Stephane Nicoll 3e8b599d95 Upgrade to AssertJ 3.13.2
Closes gh-17690
2019-08-04 13:38:38 +02:00
freekry a9e7c4ec95 Fix typo in JsonComponent javadoc
See gh-17776
2019-08-04 08:59:40 +02:00
Stephane Nicoll b15674d71e Upgrade to Spring HATEOAS 0.25.2
Closes gh-17777
2019-08-04 08:56:05 +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 b29e81fcd9 Allow defaultBindHandler to be specified on Binder
Allow a `defaultBindHandler` to be specified on the `Binder` instance
to save needing to pass it to each `bind` method call.

Closes gh-17773
2019-08-03 11:58:28 +01:00
Phillip Webb fb6568be73 Improve PropertySourceLoader file extension error
Refine the `IllegalStateException` thrown from `PropertySourceLoader`
for unknown extensions to also indicated that folder references must end
in '/'.

Closes gh-17241
2019-08-03 11:36:36 +01:00
Stephane Nicoll 99f30700e2 Upgrade to Spring Batch 4.2.0.M3
Closes gh-17347
2019-08-03 10:54:40 +02:00
Madhura Bhave ea244aa32b Merge branch '2.1.x'
Closes gh-17769
2019-08-02 09:16:05 -07:00
Madhura Bhave faaada1416 Remove liquibase check change log location
Missing change logs would lead to an exception even
if the checkChangeLogLocation was set to false. Spring Boot's check
would pass but Liquibase would fail later making this property redundant.

Fixes gh-16232
2019-08-02 09:03:45 -07:00
Stephane Nicoll f021c227e1 Polish 2019-08-02 17:42:38 +02:00
Stephane Nicoll 45915d085e Merge branch '2.1.x'
Closes gh-17767
2019-08-02 17:35:39 +02:00
Stephane Nicoll eb26492eef Polish 2019-08-02 17:31:07 +02:00
Stephane Nicoll bacb4d1715 Polish "Refine back-off strategy of Neo4j SessionFactory"
See gh-17662
2019-08-02 17:15:22 +02:00
Michael Simons 274098f2e2 Refine back-off strategy of Neo4j SessionFactory
This commit separates the auto-configuration of the `SessionFactory` in
an isolated class so that the rest of the auto-configuration is still
applied if the user provides a custom `SessionFactory` bean.

See gh-17662
2019-08-02 17:12:01 +02:00
Stephane Nicoll 89aefa6cfb Enable binding for scanned configuration properties
Closes gh-16822
2019-08-02 16:19:33 +02:00
Stephane Nicoll 2784fc1506 Merge branch '2.1.x'
Closes gh-17764
2019-08-02 13:57:22 +02:00
Stephane Nicoll 308a5e9360 Fix bean name for reactive Cassandra health indicator
Closes gh-17763
2019-08-02 13:56:16 +02:00
Stephane Nicoll cdec8a9b46 Upgrade to Spring Framework 5.1.9
Closes gh-17351
2019-08-02 13:37:50 +02:00
Madhura Bhave ce38891cdf Merge pull request #17761 from htztomic
* pr/17761:
  Polish "Support RFC 8414 in JwtDecoders and ClientRegistrations"
  Support RFC 8414 in JwtDecoders and ClientRegistrations

Closes gh-17761
2019-08-01 18:33:44 -07:00
Madhura Bhave e06b06d817 Polish "Support RFC 8414 in JwtDecoders and ClientRegistrations"
See gh-17761
2019-08-01 18:31:50 -07:00
HaiTao Zhang 8baec96453 Support RFC 8414 in JwtDecoders and ClientRegistrations
See gh-17761
2019-08-01 18:18:49 -07:00
Madhura Bhave 4e29f7b0ae Merge branch '2.1.x'
Closes gh-17762
2019-08-01 16:05:19 -07:00
Madhura Bhave 80f568bd47 Clarify RestTemplateBuilder rootUri documentation
Closes gh-15343
2019-08-01 15:59:24 -07:00
Madhura Bhave f7f858bce8 Merge branch '2.1.x'
Closes gh-17759
2019-08-01 12:44:18 -07:00
Madhura Bhave 5f3364326b Configure interceptors for WelcomePageHandlerMapping
Fixes gh-16309
2019-08-01 12:27:53 -07:00
Phillip Webb 94b5ad0f7e Fixup tests following upstream HATEOAS changes
See gh-17755
2019-08-01 15:32:39 +01:00