Commit Graph

762 Commits

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