Commit Graph

1139 Commits

Author SHA1 Message Date
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
2020-03-10 21:22:27 +00:00
Stephane Nicoll 278f769f80 Merge branch '2.2.x' 2020-03-08 17:23:56 +01:00
Stephane Nicoll 1fdb08300b Polish 2020-03-08 17:22:22 +01:00
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
2020-03-05 17:21:15 -06:00
Stephane Nicoll fa8a09d46d Merge branch '2.2.x'
Closes gh-20395
2020-03-05 10:31:17 +01:00
dreis2211 f08a9db984 Fix some deprecations
See gh-20388
2020-03-05 10:24:49 +01:00
Johnny Lim bd08b4d91c Polish DataSourceHealthIndicator
See gh-20367
2020-03-05 10:10:39 +01:00
Stephane Nicoll 51c29229d3 Polish "Improve details of neo4h health indicator"
See gh-20356
2020-03-04 15:48:00 +01:00
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
2020-03-04 15:46:38 +01:00
Stephane Nicoll 89e5c285e5 Merge branch '2.2.x'
Closes gh-20387
2020-03-04 15:44:01 +01:00
Johnny Lim 1721aeccb0 Use ServerHttpResponse.getRawStatusCode() in WebFluxTags
See gh-19987
2020-03-04 15:28:31 +01:00
Stephane Nicoll 925756dae1 Polish "Add descriptions for data source pool metrics"
See gh-20354
2020-03-01 11:02:39 -05:00
Johnny Lim 21a0b0544a Add descriptions for data source pool metrics
See gh-20354
2020-03-01 10:58:52 -05:00
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>
2020-02-25 09:22:57 -05:00
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>
2020-02-25 09:22:31 -05:00
Brian Clozel e73ee7b3fe Merge branch '2.2.x'
Closes gh-20293
2020-02-21 18:48:54 +01:00
Brian Clozel 11b9862064 Revert "Clear ProducesRequestCondition cache attribute"
Closes gh-20292
2020-02-21 17:38:43 +01:00
Brian Clozel ab72cc8fdb Revert "Add actuator specific ObjectMapper"
See gh-12951
See gh-20291
2020-02-21 17:16:24 +01:00
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
2020-02-20 14:49:50 -08:00
Stephane Nicoll 26c673a1a4 Merge branch '2.2.x' 2020-02-20 11:03:41 +01:00
Stephane Nicoll 592ae85043 Merge branch '2.1.x' into 2.2.x 2020-02-20 11:03:10 +01:00
Stephane Nicoll 6aeff91f50 Polish 2020-02-20 10:58:37 +01:00
Stephane Nicoll 287d577aea Merge branch '2.2.x'
Closes gh-20218
2020-02-18 16:59:52 +01:00
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
2020-02-18 14:59:06 +01:00
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
2020-02-17 11:33:45 +01:00
Stephane Nicoll 03bee83991 Update copyright date
See gh-20192
2020-02-16 17:20:48 +01:00
zhangt2333 e2d87a89d0 Polish
See gh-20192
2020-02-16 17:19:18 +01:00
Stephane Nicoll 2ede9e63b9 Merge branch '2.1.x' into 2.2.x
Closes gh-20117
2020-02-14 10:20:33 +01:00
Stephane Nicoll 32c1dd45a9 Revert "Merge pull request #19926 from xak2000"
Closes gh-19926
2020-02-14 10:18:02 +01:00
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
2020-02-12 20:10:25 +01:00
Stephane Nicoll 466c1ba251 Merge branch '2.2.x'
Closes gh-20118
2020-02-11 10:31:03 +01:00
Stephane Nicoll a425cc1b46 Merge branch '2.1.x' into 2.2.x
Closes gh-20117
2020-02-11 10:30:19 +01:00
Ruslan Stelmachenko 5f7e1ac4f2 Remove unnecessary leading slash in changelog locations
See gh-19926
2020-02-11 10:14:49 +01:00
Madhura Bhave 19b7dc8e4f Merge branch '2.2.x'
Closes gh-20114
2020-02-10 17:11:33 -08:00
Madhura Bhave d485708f68 Fix 404 when composite contributor is added to a group
Fixes gh-19974
2020-02-10 17:09:01 -08:00
Madhura Bhave eeab9233cc Merge branch '2.2.x'
Closes gh-20056
2020-02-06 17:45:19 -08:00
Madhura Bhave acc453db4a Polish contribution
See gh-19999
2020-02-06 17:36:05 -08:00
cbono badc83d368 Add 'uris', 'address' and 'addresses' to keys to sanitize.
See gh-19999
2020-02-06 17:23:23 -08:00
Stephane Nicoll 1c87325420 Merge branch '2.2.x' 2020-02-04 10:19:22 +01:00
Stephane Nicoll d85bdfb23c Fix checkstyle violation 2020-02-04 10:19:01 +01:00
Stephane Nicoll 9aef2bde77 Merge branch '2.2.x'
Closes gh-20030
2020-02-04 10:09:11 +01:00
Stephane Nicoll 10643b7702 Polish "Stop time web metrics when autotime is disabled"
See gh-19981
2020-02-04 10:03:08 +01:00
babjo e323e05eea Stop time web metrics when autotime is disabled
See gh-19981
2020-02-04 09:50:49 +01:00
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.
2020-02-03 17:07:56 -06:00
Scott Frederick de1a26cf35 Revert "Remove deprecated HealthIndicator and HealthAggregator 2.2 code"
This reverts commit df1837a16b.
2020-02-03 14:02:39 -06:00
Stephane Nicoll b5e23e7405 Update copyright year of changed files
See gh-20020
2020-02-03 17:39:40 +01:00
Johnny Lim b67ece48e4 Polish
See gh-20020
2020-02-03 17:37:01 +01:00
Stephane Nicoll c4daff7225 Polish "Upgrade to MongoDB Java Driver 4.0 beta1"
See gh-19960
2020-02-03 14:12:46 +01:00
Christoph Strobl d2d6dbdc00 Upgrade to MongoDB Java Driver 4.0 beta1
See gh-19960
2020-02-03 10:59:30 +01:00
dreis2211 56df70b0e7 Use Spring 5 module of Jersey
See gh-20009
2020-02-03 09:34:57 +01:00
Johnny Lim e6d5f5a271 Polish
See gh-19995
2020-02-01 09:24:20 +01:00
Andy Wilkinson 6db5ca97d3 Sort names alphabetically in metrics list response
Closes gh-19934
2020-01-30 14:05:53 +00:00
Madhura Bhave dc542b29d8 Merge branch '2.2.x'
Closes gh-19977
2020-01-28 17:00:55 -08:00
Johnny Lim f3aed11714 Update test name in WebFluxTagsTests
See gh-19976
2020-01-28 16:59:43 -08:00
Stephane Nicoll cb7e8cdbef Merge branch '2.2.x'
Closes gh-19904
2020-01-24 14:18:21 +01:00
Stephane Nicoll 99330325c0 Merge branch '2.1.x' into 2.2.x
Closes gh-19903
2020-01-24 14:16:35 +01:00
Stephane Nicoll 7fd8cce465 Polish "Close TomcatMetrics on shutdown for cleanup"
See gh-19880
2020-01-24 14:07:53 +01:00
Johnny Lim 51dfd528bd Close TomcatMetrics on shutdown for cleanup
See micrometer-metrics/micrometer#1424
See gh-19880
2020-01-24 14:04:13 +01:00
Phillip Webb 77bbe089b2 Update copyright year of changed files 2020-01-22 20:24:23 -08:00
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`.
2020-01-22 16:02:38 -08:00
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.
2020-01-22 15:49:52 -08:00
Stephane Nicoll 08967bca3e Merge branch '2.2.x'
Closes gh-19843
2020-01-21 14:44:01 +01:00
Stephane Nicoll 84324c438b Merge branch '2.1.x' into 2.2.x
Closes gh-19842
2020-01-21 14:34:44 +01:00
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
2020-01-21 14:20:28 +01:00
dreis2211 991bcf5ce4 Revisit documentation that mentions Gradle "compile" configuration
See gh-19797
2020-01-21 11:09:41 +01:00
Scott Frederick 8f102aee68 Remove deprecated 2.2 code
See gh-19699
2020-01-16 14:44:52 +01:00
Scott Frederick 2e32cb2af1 Remove deprecated HealthIndicator and HealthAggregator 2.2 code
See gh-19699
2020-01-16 14:44:51 +01:00
Scott Frederick 1f1b06dfe2 Remove deprecated Actuator metrics 2.2 code
See gh-19699
2020-01-16 14:44:09 +01:00
Scott Frederick 7031a3b17d Remove deprecated logging properties
See gh-19699
2020-01-16 14:35:41 +01:00
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
2020-01-16 14:30:47 +01:00
Andy Wilkinson 443d1a6a21 Upgrade to Liquibase 3.8.5
Closes gh-19754
2020-01-15 15:09:58 +00:00
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
2020-01-15 12:33:18 +00:00
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
2020-01-14 12:15:53 +00:00
Phillip Webb 862462b791 Update copyright year of changed files 2020-01-13 17:04:19 -08:00
Phillip Webb 1e5ba09a3e Merge branch '2.2.x' 2020-01-13 17:03:51 -08:00
Phillip Webb 15652ae4c1 Update copyright year of changed files 2020-01-13 16:47:17 -08:00
Madhura Bhave d1f51e064b Merge branch '2.2.x'
Closes gh-19701
2020-01-13 14:15:01 -08:00
Madhura Bhave e60194c7d5 Ignore trailing slash when recording Web metrics
Fixes gh-18207
2020-01-13 14:14:28 -08:00
Scott Frederick c789592e26 Remove support for deprecated Elasticsearch Jest client
Closes #19676
2020-01-13 21:03:12 +01:00
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
2020-01-13 19:59:56 +00:00
Stephane Nicoll ca1710ee56 Upgrade to Apache Cassandra 4.3.1
See gh-19588
2020-01-13 15:12:41 +01:00
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
2020-01-13 12:18:20 +01:00
Andy Wilkinson 7595336184 Build against Spring Integration 5.3.0.M1 snapshots
See gh-19650
2020-01-13 11:00:49 +00:00
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
2020-01-10 14:15:35 +00:00
Madhura Bhave abe95fa8a7 Merge branch '2.2.x'
Closes gh-19600
2020-01-09 17:57:39 -08:00
Madhura Bhave 7f0573df49 Fallback on underlying server default when determining outcome tag
This commit also changed the default outcome to SUCCESS

Fixes gh-19367
2020-01-09 17:55:35 -08:00
Stephane Nicoll 7d6f4a6666 Merge branch '2.2.x'
Closes gh-19590
2020-01-09 09:52:22 +01:00
Stephane Nicoll 99c64b7cdf Merge branch '2.1.x' into 2.2.x
Closes gh-19589
2020-01-09 09:51:45 +01:00
Matthias Stock adfbbcc0f6 Simplify validation pattern of EndpointId
See gh-19584
2020-01-09 09:42:31 +01:00
Andy Wilkinson 4efd8ba587 Merge branch '2.2.x'
Closes gh-19574
2020-01-08 14:02:50 +00:00
Andy Wilkinson 02965e9744 Fix javadoc warnings
Fixes gh-19572
2020-01-08 14:02:24 +00:00
Stephane Nicoll 6fc52b0563 Polish 2020-01-01 09:16:53 +01:00
Stephane Nicoll 2c1e81adf0 Polish 2019-12-26 10:42:40 +01:00
Phillip Webb 695de2c6f5 Polish end-to-end configuration properties tracing
See gh-14880
2019-12-13 12:47:01 -08:00
Madhura Bhave 8dcf1e4033 Provide end-to-end traceability for config properties
Closes gh-14880

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
2019-12-12 17:02:46 -08:00
Stephane Nicoll 20bebdc07d Merge branch '2.2.x'
Closes gh-19331
2019-12-09 11:58:58 +01:00
dreis2211 b1158bf35d Simplify some Stream API usages
See gh-19291
2019-12-09 11:52:46 +01:00
Madhura Bhave b42bc1b23d Merge branch '2.2.x'
Closes gh-19314
2019-12-05 12:04:46 -08:00
Madhura Bhave ed571bab24 Merge branch '2.1.x' into 2.2.x
Closes gh-19313
2019-12-05 12:03:50 -08:00
dreis2211 20ff764756 Increase cache ttl in CachingOperationInvokerTests
See gh-19193
2019-12-05 11:58:23 -08:00
Andy Wilkinson ae5ec4e41a Merge branch '2.2.x'
Closes gh-19300
2019-12-05 11:54:18 +00:00
Andy Wilkinson 758b80a0fe Merge branch '2.1.x' into 2.2.x
Closes gh-19299
2019-12-05 11:53:55 +00:00
luoyuan c6a184474c Remove redundant hasText check as query always has text
See gh-19290
2019-12-05 11:51:35 +00:00
Madhura Bhave 0a2387ed0b Merge branch '2.2.x'
Closes gh-19279
2019-12-04 14:42:34 -08:00
Madhura Bhave 2c4a1f1c15 Display @Validated constructor bound properties in configprops endpoint
Fixes gh-19219
2019-12-04 14:41:34 -08:00
Andy Wilkinson b6fb251097 Merge branch '2.2.x'
Closes gh-19191
2019-11-29 09:55:14 +00:00
Andy Wilkinson 189f74220c Merge branch '2.1.x' into 2.2.x
Closes gh-19190
2019-11-29 09:52:17 +00:00
Andy Wilkinson e8eace2d5b Polish "Fix Liquibase endpoint's output with multiple datasources"
See gh-19171
2019-11-29 09:50:48 +00:00
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
2019-11-29 09:50:43 +00:00
Stephane Nicoll 79201b61b6 Merge branch '2.2.x'
Closes gh-19158
2019-11-27 11:47:46 +01:00
Stephane Nicoll ce16c9e945 Merge branch '2.1.x' into 2.2.x
Closes gh-19157
2019-11-27 11:47:23 +01:00
Stephane Nicoll 2356462587 Polish "Remove '.' and '-' reference in the EndpointId javadoc"
See gh-19101
2019-11-27 11:45:35 +01:00
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
2019-11-27 11:44:13 +01:00
dreis2211 8a730ff630 Use DateTimeFormatter in favor of SimpleDateFormat
See gh-19142
2019-11-27 11:07:56 +01:00
Stephane Nicoll 12c5cdceb1 Merge branch '2.2.x'
Closes gh-19104
2019-11-23 12:05:43 +01:00
thelproad 65ab82b3cd Remove redundant code
See gh-19000
2019-11-23 12:01:19 +01:00
dreis2211 21dc7e9ca3 Fix StepVerifier usage in HealthIndicatorReactiveAdapterTests 2019-11-22 21:04:10 +01:00
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
2019-11-21 13:46:49 +01:00
Madhura Bhave 6e22ddc1a6 Merge branch '2.1.x' into 2.2.x 2019-11-19 12:09:49 -08:00
Madhura Bhave 849a76c6c2 Polish 2019-11-19 12:07:05 -08:00
Madhura Bhave ff22bd4827 Merge branch '2.1.x' into 2.2.x
Closes gh-19059
2019-11-19 11:52:26 -08:00
Madhura Bhave a3a53d299f Check authorities when exposing health details
Fixes gh-18998
2019-11-19 11:18:07 -08:00
dreis2211 6b500d82b4 Polish
See gh-18918
2019-11-12 14:06:47 +01:00
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
2019-11-06 12:46:47 +01:00
dreis2211 1b2112ea8c Reduce method visibility in EndpointDiscovererTests
See gh-18884
2019-11-05 14:14:24 +01:00
Andy Wilkinson ce01f7f150 Merge branch '2.1.x'
Closes gh-18882
2019-11-05 11:05:51 +00:00
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
2019-11-05 10:51:36 +00:00
Phillip Webb b3e9a06476 Polish 2019-10-30 15:02:14 -07:00
Stephane Nicoll d6d32ec01d Polish 2019-10-29 09:02:25 +01:00
Stephane Nicoll 11e0045ec6 Polish contribution
See gh-18736
2019-10-29 08:34:48 +01:00
mattisonchao f61da8b723 Polish
See gh-18736
2019-10-29 08:32:23 +01:00
dreis2211 9ece2e277f Remove redundant explicit types
See gh-18754
2019-10-27 08:33:01 +01:00
dreis2211 911b12f28d Fix JsonParser deprecation
See gh-18750
2019-10-26 11:53:17 +02:00
Stephane Nicoll 3d253854e9 Handle constructor bound configuration properties in /configprops
This commit updates the configprops actuator endpoint to detect
configuration properties that are bound using a constructor.

Closes gh-18636
2019-10-24 14:32:40 +02:00
Phillip Webb 597baf9774 Polish "Optimize logger calls"
See gh-18710
2019-10-23 21:00:05 -07:00
wycm 240b1f9e29 Optimize logger calls
Guard logger calls to ensure that they are only made when the
level is set.

See gh-18710
2019-10-23 20:59:11 -07:00
Phillip Webb ba30ee03df Improve health contributor null support
Update `NamedContributorsMapAdapter` to check for `null` keys or values
during construction. Also update `HealthEndpointSupport` to allow
null component entries.

See gh-18687
2019-10-23 15:14:51 -07:00
Phillip Webb 7c9ac03014 Filter empty health contributions
Update `HealthEndpointSupport` so that aggregate elements that don't
ultimately provide a contribution are filtered out. Prior to this
commit an NPE was returned when calculating the aggregate status.

Fixes gh-18687
2019-10-23 15:14:51 -07:00
dreis2211 8ecdf919f8 Fix Mockito deprecations
See gh-18689
2019-10-23 09:49:33 +02:00
Stephane Nicoll d254c62712 Polish tests 2019-10-22 14:27:25 +02:00
Stephane Nicoll 64401216b0 Merge branch '2.1.x'
Closes gh-18614
2019-10-16 10:58:03 +02:00
contextshuffling a8c6540191 Use LinkedHashSet for deterministic order in test assertion
See gh-18612
2019-10-16 10:47:58 +02:00
Stephane Nicoll 9c6e5f0904 Merge branch '2.1.x'
Closes gh-18585
2019-10-15 08:15:42 +02:00
dreis2211 abfb87d1a3 Rename tests to match Surefire expectations
See gh-18579
2019-10-15 08:11:47 +02:00
dreis2211 d8de6fff53 Polish
See gh-18557
2019-10-12 16:55:07 +01:00
dreis2211 3174f06bf2 Remove usage of @InjectMocks
See gh-18557
2019-10-12 16:54:57 +01:00
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
2019-10-02 10:48:57 +01:00
Andy Wilkinson 3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
2019-10-02 10:48:30 +01:00
Phillip Webb 869a8c2691 Merge branch '2.1.x'
Closes gh-18411
2019-09-28 22:45:56 -07:00
Phillip Webb 38968d2fff Polish 'Apply TTL invocation caching on reactor types'
Extract reactor specific code to an inner class to protect
against ClassNotFound exceptions if reactor is not in use.

Also add support for `Flux`.

See gh-18339
2019-09-28 21:46:36 -07:00
dreis2211 33d8bfa99d Apply TTL invocation caching on reactor types
Update `CachingOperationInvoker` so that TTL caching is applied directly
to reactive types. Prior to this commit, a `Mono` would be cached, but
the values that it emitted would not.

See gh-18339
2019-09-28 21:43:38 -07:00
Stephane Nicoll 15eeedb59a Merge branch '2.1.x'
Closes gh-18380
2019-09-27 17:00:23 +02:00
Phillip Webb a94ab673a3 Add health endpoint 'show-components' support
Add a `show-components` property under `management.endpoint.health` and
`management.endpoint.health.group.<name>` that can be used to change
when components are displayed.

Prior to this commit it was only possible to set `show-details` which
offered an "all or nothing" approach to the resulting JSON. The new
switch allows component information to be displayed whilst still hiding
potentially sensitive details returned from the actual `HealthIndicator`.

Closes gh-15076
2019-09-26 16:17:28 -07:00
Phillip Webb 69c561a69a Rename health JSON 'details' to 'components' in v3
Update the health endpoint so the nested components are now exposed
under `components` rather than `details` when v3 of the actuator
REST API is being used.

This distinction helps to clarify the difference between composite
health (health composed of other health components) and health
details (technology specific information gathered by the indicator).

Since this is a breaking change for the REST API, it is only returned
for v3 payloads. Requests made accepting only a v2 response will have
JSON provided in the original form.

Closes gh-17929
2019-09-26 16:16:23 -07:00
Phillip Webb cd1b7c1a9c Test v3 actuator API with loggers endpoint
Update `LoggersEndpointWebIntegrationTests` to ensure that the new
v3 media type can be used.

See gh-17929
2019-09-26 16:16:19 -07:00
Phillip Webb deb9d67cef Add Actuator ApiVersion support and bump version
Add `ApiVersion` enum that can be injected into actuator endpoints if
they need to support more than one API revision.

Spring MVC, WebFlux and Jersey integrations now detect the API version
based on the HTTP accept header. If the request explicitly accepts a
`application/vnd.spring-boot.actuator.v` media type then the version
is set from the header. If no explicit Spring Boot media type is
accepted then the latest `ApiVersion` is assumed.

A new v3 API revision has also been introduced to allow upcoming health
endpoint format changes. By default all endpoints now consume and
can produce v3, v2 and `application/json` media types.

See gh-17929
2019-09-26 16:16:15 -07:00
Phillip Webb 323a78c4b9 Add property to migrate deprecated endoint IDs
Allow legacy actuator endpoint IDs that contain dots to be transparently
migrated to the new format. This update will allow Spring Cloud users
to proactively migrate from endpoints such as `hystrix.stream` to
`hystrixstream`.

Closes gh-18148
2019-09-24 19:53:50 -07:00
Stephane Nicoll c2df1afff0 Start building against Spring Integration 5.2.0 snapshots
See gh-18254
2019-09-23 15:42:41 +02:00
Phillip Webb 221ff0ff6d Polish configuration property bean classes
Refactor the `org.springframework.boot.actuate.context` package
with the following changes:

- Deprecate several classes which would ideally be internal

- Replace `ConfigurationBeanFactoryMetadata` with a new
  `ConfigurationPropertiesBean` class to better reflect that we no
  longer maintain meta-data directly.

- Use constructor injection and final fields whenever possible

- Rename `ConfiguraionPropertiesBeanDefinition` to
  `ConfigurationPropertiesValueObjectBeanDefinition` to align
  with the binder changes made in commit 0b3015e4ff

- Add additional tests

Closes gh-16903
2019-09-20 13:42:33 -07:00
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
Phillip Webb fd67f7ba3f Merge branch '1.5.x' into 2.0.x 2019-07-17 21:47:04 +01:00
Stephane Nicoll 56ce2b8e3f Polish "Add metrics support for idle jdbc connections"
See gh-17504
2019-07-17 14:14:47 +02:00
ayudovin 9acc02b5cc Add metrics support for idle jdbc connections
See gh-17504
2019-07-17 14:14:47 +02:00
Phillip Webb 01933f9b06 Merge previously split strings
Merge some string lines that were previously split because of the
90 chars wide formatting.
2019-07-15 00:24:19 +01:00
Phillip Webb c3816bfe7b Polish output capture names 2019-07-15 00:24:18 +01:00
dreis2211 82047a2544 Polish
See gh-17505
2019-07-14 11:38:40 +02:00
Madhura Bhave d590c3ed10 Merge branch '2.1.x'
Closes gh-17486
2019-07-10 15:32:22 -07:00
Madhura Bhave 773dda3d55 Log file location should be evaluated just once
Using a random value for the logfile name caused
the logfile endpoint to return a 404 as the name
was resolved from the environment on every request.
This commit registers a bean for LogFile which is then
used by the logfile endpoint.

Fixes gh-17434
2019-07-10 14:46:09 -07:00
Brian Clozel 2830847344 Optimize reactor operators in actuator support
This commit uses native Reactor operators `Mono.fromCallable` and
`subscribeOn` for better performance and support.

Fixes gh-17452
2019-07-10 12:06:26 +02:00
dreis2211 25586a2e23 Use Assertions.contentOf() where possible
See gh-17444
2019-07-10 06:40:52 +01:00
Andy Wilkinson d93c79316d Align with body method changes in RequestBodySpec
Closes gh-17460
2019-07-09 12:13:23 +01:00
Andy Wilkinson 2816635418 Polish 2019-07-04 17:51:20 +01:00
dreis2211 7c6fd31d06 Use Spring 5 module of Jersey
See gh-17412
2019-07-04 10:26:28 +01:00
Madhura Bhave 39b15af5d6 Polish "Provide links / when using a separate management port"
See gh-17418
2019-07-03 16:19:40 -07:00
HaiTao Zhang c108629311 Provide links for actuators at / when using a separate management port
See gh-17418
2019-07-03 16:19:40 -07:00
Andy Wilkinson e0048f234b Polish 2019-07-03 21:59:51 +01:00
Andy Wilkinson c5cae28261 Add support for plain text thread dumps to the threaddump endpoint
When a request that accepts text/plain is received, the threaddump
endpoint will now return a thread dump in plain text. The format of
this text is modelled after the output produced by JVisualVM when
connecting to a remote process over JMX. Note that this output does
not include all of the information in, for example, JStack's output
as it is not available via Java 8's ThreadInfo API.

Rather than the custom formatting logic, using ThreadInfo's toString()
method was considered but its output is documented as being undefined
and implementation specific. The implementation used while developing
this feature produced output that did not match that of JStack or
JVisualVM and truncated stack traces quite considerably.

At the time of writing the format produced by the endpoint could be
consumed by both Thread Dump Analyzer [1] and https://fastthread.io.

Closes gh-2339

[1] https://github.com/irockel/tda
2019-07-03 21:51:56 +01:00
Phillip Webb a66c4d3096 Unify method visibility of private classes
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
2019-07-03 11:39:47 -07:00
Andy Wilkinson 4ab4198168 Switch to Infinispan's Spring 5 integration
Closes gh-17333
2019-07-02 12:50:12 +01:00
Phillip Webb 605599138e Merge branch '2.1.x' 2019-06-28 23:56:02 -07:00
Phillip Webb 92bff3c328 Merge branch '2.0.x' into 2.1.x 2019-06-28 23:42:28 -07:00
Phillip Webb cfeb0239b7 Merge branch '1.5.x' into 2.0.x 2019-06-28 23:28:34 -07:00
Stephane Nicoll e560b7f6ba Remove public modifier on JUnit5 lifecycle methods
See gh-17292
2019-06-21 18:09:05 +02:00
Brian Clozel 809a3965c9 Add missing outcome tag for WebClient metrics
On error cases, the "outcome" tag would be missing from recorded metrics
for the `WebClient`.

This commit fixes this issue and improves the reference documentation by
mentioning the tag values used for error cases, when the client response
is not received (I/O errors, client error, etc).

Fixes gh-17219
2019-06-18 15:29:22 +02:00
Andy Wilkinson cffc870fd6 Fix test failures on Windows
Since the move to JUnit 5, a number of tests were failing on Windows.
The majority were failing due to open file handles preventing the
clean up of the tests' temporary directory. This commit addresses
these failures by updating the tests to close JarFiles, InputStreams,
OutputStreams etc.

A change has also been made to CachingOperationInvokerTests to make
a flakey test more robust. Due to System.currentTimeMillis() being
less precise on Windows than it is on *nix platforms, the test could
fail as it would not sleep for long enough for the TTL period to have
expired.
2019-06-13 09:24:31 +01:00
Phillip Webb 266d6334b2 Fix checkstyle RedundantModifier test violations 2019-06-07 20:46:33 -07:00
Phillip Webb cde4f0d688 Fix checkstyle violations 2019-06-07 13:27:14 -07:00
Phillip Webb 4c21dc1c31 Merge branch '2.1.x' 2019-06-07 12:51:32 -07:00
Phillip Webb fed11febec Fix checkstyle violations 2019-06-07 12:48:55 -07:00
Andy Wilkinson b18fffaf14 Move tests to JUnit 5 wherever possible 2019-06-07 12:25:54 +01:00
Andy Wilkinson aef92b9295 Merge branch '2.1.x'
Closes gh-17079
2019-06-07 11:00:44 +01:00
Andy Wilkinson 24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
2019-06-07 10:50:34 +01:00
Andy Wilkinson c6c139d980 Merge branch '1.5.x' into 2.0.x 2019-06-07 10:46:31 +01:00
Phillip Webb d306b31ce9 Merge branch '2.1.x' 2019-06-04 02:08:00 -07:00
Phillip Webb ccfbd03482 Merge branch '2.0.x' into 2.1.x 2019-06-04 02:07:14 -07:00
Phillip Webb b442d3b906 Merge branch '1.5.x' into 2.0.x 2019-06-04 01:49:03 -07:00
Stephane Nicoll 6a78995d61 Polish "Fix typo in javadoc"
See gh-17044
2019-06-02 09:54:30 +02:00
fidel 2ec0996a6f Fix typo in javadoc
See gh-17044
2019-06-02 09:54:11 +02:00
Phillip Webb 4b2fdee3fc Polish 2019-05-31 15:11:06 -07:00
Andy Wilkinson 0644a79401 Repackage output capture and always use extension declaratively
Closes gh-17029
2019-05-31 18:33:10 +01:00
Phillip Webb d11d5ceb29 Split up JUnit 5 OutputCapture class
Split the JUnit 5 `OutputCapture` class into separate `OutputExtension`
and `CapturedOutput` classes. The JUnit 5 callback methods are now
contained only in the `OutputExtension` class so no longer pollute the
public API that users will interact with.

The `CapturedOutput` class has also been updated to capture System.err
and System.out separately to allow distinct assertions if required.

Closes gh-17029
2019-05-30 23:44:35 -07:00
Phillip Webb 68a3fbd7a0 Extract AutoTimer interface for metrics
Refactor `Autotime` from a properties object to an interface and
change the existing metric recording implementations. The `AutoTimer`
interface is a general purpose callback that can be applied to a
`Timer.Builder` to configure it. Autotime properties are now located
in `spring-boot-actuator-autoconfigure` and have become an
implementation of the interface.

Closes gh-17026
2019-05-30 16:03:34 -07:00
Phillip Webb 68aec8b6ee Polish 2019-05-30 11:30:27 -07:00
Stephane Nicoll 2b5632ec3e Polish "Add Duration support in /configprops endpoint"
Closes gh-16539
2019-05-21 10:02:15 +02:00
dreis2211 47d85bb4fe Add Duration support in /configprops endpoint
See gh-16539
2019-05-21 09:55:39 +02:00
Phillip Webb 963a544fb1 Merge branch '2.1.x'
Closes gh-16860
2019-05-14 21:31:08 -07:00
Phillip Webb f790556f96 Polish 'Drop blocking RedisReactiveHealthIndicator calls'
See gh-16756
2019-05-14 21:28:30 -07:00
ayudovin de857372a5 Drop blocking RedisReactiveHealthIndicator calls
Update `RedisReactiveHealthIndicator` so that `getReactiveConnection`
is not called directly since it blocks.

Fixed gh-16756
2019-05-14 21:23:40 -07:00
Phillip Webb 3a9ca5fa30 Update copyright header of changed files 2019-05-14 21:05:53 -07:00
Madhura Bhave 1db1c8b03c Validate our own tests work with JUnit5 and the vintage engine
Closes gh-14737

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-05-08 16:05:44 +02:00
Stephane Nicoll 8045bf1f50 Polish "Allow configuration of auto-timed metrics"
Closes gh-15988
2019-05-01 08:17:06 +02:00
Tadaya Tsuyukubo 4df6f5dee0 Allow configuration of auto-timed metrics
When `management.metrics.web.server.auto-time-requests` is enabled
(default=true), Spring Boot collects metrics on controller methods even
when they are not annotated with `@Timed`.

When this happens, created metrics are based on the default
`@Timed` configuration and there is no way to customize the
configuration of those auto-timed controller metrics.

This commit adds default configurations to auto-timed requests on both
client and server sides.

See gh-15988
2019-05-01 08:16:42 +02:00
Phillip Webb 17aaf26590 Use consistent javadoc style for annotation links
Closes gh-13920
2019-04-24 19:37:59 -07:00
Phillip Webb 1e44aba772 Fix compiler warnings and polish
Fix various compiler warnings and apply a little polish.
2019-04-24 19:37:42 -07:00
Phillip Webb b879972d0d Migrate to MergedAnnotations API
Migrate away from `AnnotationUtils` and `AnnotatedElementUtils`
when possible to the new `MergedAnnotations` API.

Closes gh-16551
2019-04-18 15:40:02 -07:00
Phillip Webb 5f1bbf8c72 Update copyright header of changed files 2019-04-15 17:51:08 -07:00
Phillip Webb 7d4118a0fe Align withBean methods with ApplicationContext
Rework `AbstractApplicationContextRunner.withBean` methods to
align signatures as much as possible with those provided by
the `ApplicationContext`.

Also update the implementation to use a dedicate member
variable rather than adding initializers.

Closes gh-16011
2019-04-15 17:51:08 -07:00
Phillip Webb 2dfd916c96 Polish 2019-04-15 17:51:08 -07:00
Brian Clozel 8ac69442f1 Deprecate ElasticsearchHealthIndicator
Since the transport client has been deprecated in gh-15008, the health
indicator for that should be deprecated as well.

See gh-15008
2019-04-16 00:26:59 +02:00
Brian Clozel 2e107929a0 Upgrade to Elasticsearch 6.7.1
Closes gh-16569
2019-04-16 00:21:17 +02:00
Vedran Pavic bbaa98175f Upgrade to Hazelcast 3.12
Closes gh-16503
2019-04-11 12:38:47 +02:00
Brian Clozel 3e56707132 Overriding getMappingPathPatterns is not required
After a hierarchy change in Spring Framework in gh-22543,
`AbstractWebFluxEndpointHandlerMapping` doesn't need to override the
`getMappingPathPatterns` method anymore.
2019-04-10 08:41:14 +02:00
Stephane Nicoll a828072132 Migrate tests to use withBean
See gh-16011
2019-04-09 12:15:05 +02:00
dreis2211 52cd9c6cac Fix compilation error
Closes gh-16476
2019-04-06 17:26:22 +02:00
Stephane Nicoll c432288ed1 Migrate ApplicationContext to common hierarchy
This commit migrates `AnnotationConfigReactiveWebApplicationContext`
parent to the `GenericApplicationContext` abstraction. Any use of
`AnnotationConfigWebApplicationContext` is also removed as it also
inherits from the `AbstractRefreshableApplicationContext` outdated
hierarchy.

A new `AnnotationConfigServletWebApplicationContext` context is
introduced instead, extending from `GenericApplicationContext` and
providing the counter part of the reactive context for the Servlet-based
web app tests.

See gh-16096
2019-04-05 14:17:41 +02:00
Andy Wilkinson 537a97c1e5 Merge branch '2.1.x'
Closes gh-16461
2019-04-04 14:40:54 +01:00
Andy Wilkinson 8a04e2cc86 Honor custom change log tables in Liquibase endpoint
Closes gh-16442
2019-04-04 14:40:47 +01:00
Phillip Webb ad7eebee9e Merge branch '2.1.x' 2019-04-03 17:00:25 -07:00
Phillip Webb f12ab1ff90 Update copyright header of changed files 2019-04-03 16:13:00 -07:00
Phillip Webb 2376f973f4 Merge branch '2.1.x' 2019-04-02 13:46:36 -07:00
Phillip Webb 47c6bf741d Merge branch '2.0.x' into 2.1.x 2019-04-02 13:40:21 -07:00
Phillip Webb 07c000c5b7 Merge branch '1.5.x' into 2.0.x 2019-04-02 13:34:28 -07:00
Andy Wilkinson e1a6726d76 Polish "Update CORS handling according to Framework changes"
See gh-16410
2019-04-02 12:48:00 +01:00
Sebastien Deleuze 2f9db7eec6 Update CORS handling according to Framework changes
This commit updates CORS handling according to Framework changes
introduced via [1]. It also fixes tests according to the new behavior.

See gh-16410

[1] d27b5d0ab6.
2019-04-02 12:47:07 +01:00
Andy Wilkinson 4f42597aca Merge branch '2.1.x' 2019-04-02 10:53:14 +01:00
Andy Wilkinson 02b24b6ed3 Specify that log file endpoint's response is UTF-8 encoded
Closes gh-16189
2019-04-02 10:52:18 +01:00
Andy Wilkinson 878a635bfb Merge branch '2.1.x' 2019-03-28 11:48:47 +00:00
Spring Operator 9fc3ac7d49 Use HTTPS for external links wherever possible
See gh-16320
2019-03-28 09:49:30 +00:00
Andy Wilkinson 864942ad4f Merge branch '2.0.x' into 2.1.x 2019-03-28 09:35:53 +00:00
Spring Operator 1a4c6f2dac Use HTTPS for external links wherever possible
See gh-16319
2019-03-27 20:06:52 +00:00
Andy Wilkinson 36c1c051b8 Merge branch '2.1.x' 2019-03-20 16:55:10 +00:00
Andy Wilkinson e23f72c8b0 Merge branch '2.0.x' into 2.1.x 2019-03-20 16:53:48 +00:00
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 2019-03-20 16:45:26 +00:00
Andy Wilkinson b828b398b5 Merge branch '2.1.x' 2019-03-19 17:11:45 +00:00
Andy Wilkinson a36aa67b52 Merge branch '2.0.x' into 2.1.x 2019-03-19 17:04:41 +00:00
Spring Operator 3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
2019-03-19 16:58:31 +00:00
Madhura Bhave 223f2be7d2 Inject InfoContributors instead of exposing them on InfoEndpoint
Closes gh-13586
2019-03-13 13:16:47 -07:00
Brian Clozel 5a66dc8c6e Merge branch '2.1.x' 2019-03-13 12:53:23 +01:00
Brian Clozel 9906ef2400 Merge branch '2.0.x' into 2.1.x 2019-03-13 12:52:47 +01:00
Brian Clozel 6138041578 Polish
Fixes gh-16014
2019-03-13 11:55:41 +01:00
Johnny Lim a6ccdbe19f Handle missing exceptions in WebMvcMetricsFilter
Prior to this commit, exceptions nested in
`NestedServletExceptions` would not be recorded by the
`WebMvcMetricsFilter`. This commit ensures that exceptions
happening downstream (e.g. happening while writing the response
body itself) are properly recorded.

See https://github.com/micrometer-metrics/micrometer/issues/1190
See gh-16014
2019-03-13 11:07:32 +01:00