Commit Graph

8542 Commits

Author SHA1 Message Date
Phillip Webb 9a33a723fe Update copyright year of changed files 2020-03-23 14:15:08 -07:00
Phillip Webb ce1ae11c26 Merge branch '2.2.x' 2020-03-23 14:14:47 -07:00
Phillip Webb 16b5ea3414 Update copyright year of changed files 2020-03-23 14:13:33 -07:00
Brian Clozel 4be64e8f9c Add "management.health.probes.enabled" config property
Prior to this commit, we were relying on the
`"spring.main.cloud-platform"` property for overriding cloud platform
detection and enabling liveness and readiness probes. Changes made in
gh-20553 have now been reverted.

This commit adds the `"management.health.probes.enabled"` configuration
property. The auto-configuration now enables the HTTP Probes and
`HealthIndicator` if this property is enabled, or if the Kubernetes
cloud platform is detected.

This property is `false` by default for now, since enabling this for all
Spring Boot applications would be a breaking change. In this case, the
global `"/actuator/health"` endpoint could report `OUT_OF_SERVICE`
during startup time because the application now reports the readiness as
well.

See gh-19593
2020-03-23 22:04:30 +01:00
Brian Clozel 05db46951d Revert "Override CloudPlatform auto-detection with property"
This reverts commit 4b7ed5efef.

See gh-20553
2020-03-23 21:23:51 +01:00
Brian Clozel 3cc0ab1583 Polish reference docs on Kubernetes Probes
See gh-19593
2020-03-23 21:23:51 +01:00
Madhura Bhave 7444306d0b Polish docs 2020-03-23 13:01:16 -07:00
Madhura Bhave a06f4f21e3 Combine application and resources layers into a single layer
Closes gh-20562
2020-03-23 12:59:42 -07:00
Madhura Bhave 952e529787 Rename "classes" to "application" in custom layer configuration
Closes gh-20539
2020-03-23 10:44:03 -07:00
Stephane Nicoll 29c89f3c27 Upgrade to Reactor Dysprosium-SR6
Closes gh-20570
2020-03-23 18:41:24 +01:00
Stephane Nicoll 8d9c9126b1 Upgrade to Reactor Dysprosium-SR6
Closes gh-20569
2020-03-23 18:40:08 +01:00
Stephane Nicoll 8c9711ab9a Merge branch '2.2.x'
Closes gh-20622
2020-03-23 15:28:41 +01:00
Stephane Nicoll bf15276af1 Fix import in constructor binding example
Closes gh-20378
2020-03-23 15:27:08 +01:00
Stephane Nicoll 1a9065f46f Merge branch '2.2.x'
Closes gh-20621
2020-03-23 14:38:03 +01:00
Stephane Nicoll 8f265f8d57 Polish "Fix @FlywayDataSource with multiple data sources"
See gh-20617
2020-03-23 14:37:23 +01:00
Shimbo Takaaki 2410d6bbd1 Fix @FlywayDataSource with multiple data sources
See gh-20617
2020-03-23 14:25:57 +01:00
Stephane Nicoll 34b71561d3 Merge branch '2.2.x'
Closes gh-20619
2020-03-23 14:22:56 +01:00
Stephane Nicoll 7be3db2d4d Merge branch '2.1.x' into 2.2.x
Closes gh-20618
2020-03-23 14:22:30 +01:00
Stephane Nicoll bcce6f9f07 Document that Jackson is a required dependency of the Actuator
Closes gh-19564
2020-03-23 14:16:55 +01:00
Stephane Nicoll ec8d2c5843 Merge branch '2.2.x'
Closes gh-20616
2020-03-23 12:57:00 +01:00
Stephane Nicoll 39b965e1fd Merge branch '2.1.x' into 2.2.x
Closes gh-20615
2020-03-23 12:55:44 +01:00
Stephane Nicoll f5761bd508 Auto-configure listener container factory without consumer factory
Previously, the presence of a `ConsumerFactory` bean would make the
auto-configured one to back off, leading to a failure down the line if
no available instance matches the generics criterion. This commit
improves the auto-configuration to create a `ConsumerFactory<?,?>`
behind the scenes if none is available.

Closes gh-19221
2020-03-23 12:52:33 +01:00
Andy Wilkinson 4cdb968efa Utilise Reactor Netty's new graceful shutdown support
Closes gh-20613
2020-03-23 10:52:31 +00:00
Andy Wilkinson 6b47dd06e8 Start building against Reactor Dysprosium-SR6 snapshots
See gh-20570
2020-03-23 10:52:30 +00:00
Stephane Nicoll 3735771f9c Merge branch '2.2.x'
Closes gh-20612
2020-03-23 11:17:52 +01:00
Stephane Nicoll 08a89b6288 Polish "Configure signature algorithm when using public key jwt decoder"
See gh-20523
2020-03-23 11:17:22 +01:00
Michael Kreis 69e33d6e62 Configure signature algorithm when using public key jwt decoder
See gh-20523
2020-03-23 10:56:59 +01:00
Johnny Lim cc18b91723 Fix "Building Docker Images" section level
See gh-20608
2020-03-23 08:19:49 +00:00
Stephane Nicoll 615ec8b6f5 Merge branch '2.2.x'
Closes gh-20607
2020-03-22 19:57:47 +01:00
dreis2211 6ff842441c Polish BindableTests
See gh-20604
2020-03-22 19:55:32 +01:00
dreis2211 ef9f1d39a3 Remove redundant MockitoAnnotations.initMocks()
See gh-20601
2020-03-22 08:43:50 +01:00
Stephane Nicoll 70aa788747 Merge branch '2.2.x'
Closes gh-20600
2020-03-21 15:15:20 +01:00
Stephane Nicoll 8593270b5b Only remove trailing slash from URI value
This commit upgrades the algorithm when trailing slash are to be
ignored. Previously a root URI (i.e. "/") would result to to empty
string which is an issue for monitoring system that requires tag values
to be non empty. If the URI is a single character, the trailing is not
applied and "/" is left as is.

Closes gh-20536
2020-03-21 15:11:50 +01:00
Brian Clozel 6b9f2cac17 Fix section title levels in reference docs 2020-03-21 11:33:42 +01:00
Brian Clozel ffdf9a422f Polish Liveness and Readiness support
This commit moves the core Liveness and Readiness support to its own
`availability` package. We've made this a core concept independent of
Kubernetes.

Spring Boot now produces `LivenessStateChanged` and
`ReadinessStateChanged` events as part of the typical application
lifecycle.

Liveness and Readiness Probes (`HealthIndicator` components and health
groups) are still configured only when deployed on Kubernetes.

This commit also improves the documentation around Probes best practices
and container lifecycle considerations.

See gh-19593
2020-03-20 23:54:00 +01:00
Andy Wilkinson 6cff66ac4d Merge branch '2.2.x'
Closes gh-20590
2020-03-20 11:03:37 +00:00
Andy Wilkinson 9e7ab46ecc Merge branch '2.1.x' into 2.2.x
Closes gh-20589
2020-03-20 11:03:15 +00:00
Jordan Simpson 0d9d0f8532 Link to correct factory in TomcatReactiveWebServerFactory's javadoc
See gh-20583
2020-03-20 11:02:41 +00:00
Scott Frederick 3f378e1276 Add command-line options for Gradle bootBuildImage parameters
This commit adds support for setting the image name and builder
parameters of the Gradle bootBuildImage task using command-line
options as an alternative to DSL configuration.

See gh-20520
2020-03-19 17:21:07 -05:00
Brian Clozel b30e5a60c5 Polish
See gh-19593
2020-03-19 20:07:35 +01:00
Stephane Nicoll 579a6ac254 Adapt tests for support for Java 14
See gh-20576
2020-03-19 14:54:33 +01:00
Andy Wilkinson f5e1bad900 Polish 2020-03-19 13:53:29 +00:00
Brian Clozel fd0b2f6695 Add Kubernetes Liveness and Readiness Probes support
Prior to this commit and as of Spring Boot 2.2.0, we would advise
developers to use the Actuator health groups to define custom "liveness"
and "readiness" groups and configure them with subsets of existing
health indicators.

This commit addresses several limitations with that approach.

First, `LivenessState` and `ReadinessState` are promoted to first class
concepts in Spring Boot applications. These states should not only based
on periodic health checks. Applications should be able to track changes
(and adapt their behavior) or update states (when an error happens).

The `ApplicationStateProvider` can be injected and used by applications
components to get the current application state. Components can also
track specific `ApplicationEvent` to be notified of changes, like
`ReadinessStateChangedEvent` and `LivenessStateChangedEvent`.
Components can also publish such events with an
`ApplicationEventPublisher`. Spring Boot will track startup event and
application context state to update the liveness and readiness state of
the application. This infrastructure is available in the
main spring-boot module.

If Spring Boot Actuator is on the classpath, additional
`HealthIndicator` will be contributed to the application:
`"LivenessProveHealthIndicator"` and `"ReadinessProbeHealthIndicator"`.
Also, "liveness" and "readiness" Health groups will be defined if
they're not configured already.

Closes gh-19593
2020-03-19 14:11:00 +01:00
Brian Clozel b680db6cd8 Add HealthEndpointGroupsRegistry and its Customizer
Prior to this commit, `HealthContributor` would be exposed under the
main `HealthEndpoint` and subgroups, `HealthEndpointGroups`. Groups are
driven by configuration properties and there was no way to contribute
programmatically new groups.

This commit introduces the `HealthEndpointGroupsRegistry` (a mutable
version of `HealthEndpointGroups`) and a
`HealthEndpointGroupsRegistryCustomizer`. This allows configurations to
add/remove groups during Actuator auto-configuration.

Closes gh-20554
2020-03-19 14:11:00 +01:00
Brian Clozel 4b7ed5efef Override CloudPlatform auto-detection with property
This commit adds a new `"spring.main.cloud-platform"` configuration
property that overrides the `CloudPlatform` detection.

This makes it easier to enable paltform-specific features when running
applications locally or when writing integration tests.

Closes gh-20553
2020-03-19 14:11:00 +01:00
Stephane Nicoll 0b7f198b54 Publish Maven plugin API
This commit enables javadoc generator for the Spring Boot Maven plugin.

This also harmonizes the structure of the documentation, with an `/api`
and a `/reference` root directories for the javadoc and the reference
guide respectively.

Closes gh-20127
2020-03-19 14:00:58 +01:00
Stephane Nicoll 58a45c53ac Upgrade to Groovy 2.5.10
Closes gh-20575
2020-03-19 13:33:57 +01:00
Stephane Nicoll 5893786cbb Polish "Add 'threads' configuration group for embedded containers"
See gh-19475
2020-03-19 13:13:45 +01:00
cbono 208f58104a Add 'threads' configuration group for embedded containers
See gh-19475
2020-03-19 12:12:11 +01:00
Stephane Nicoll bece0f1360 Start building against Spring Kafka 2.3.7 snapshots
See gh-20574
2020-03-19 11:00:19 +01:00