This commit migrates the Actuator onto the new endpoint infrastruture.
In addition to the existing support for accessing the endpoints via
JMX and HTTP using Spring MVC, support for access via HTTP using
Jersey and WebFlux has been added. This includes using a separate
management port where we now spin up an additional, appropriately
configured servlet or reactive web server to expose the management
context on a different HTTP port to the main application.
Closes gh-2921
Closes gh-5389
Closes gh-9796
Jolokia is a 100% web concern and does not fit in the Endpoint
infrastructure. This commit removes `JolokiaMvcEndpoint` and exposes
the servlet directly instead while still being part of the
management context. As such, the Jolokia servlet is exposed beneath
the management context path and will move to a separate port when
the management port is not the same as the main server port.
Closes gh-9843
This commit replaces the Acuator's support for hypermedia with a
single endpoint that returns HAL-formatted links to all of the
available endpoints. This is done without requiring Spring HATEOAS
to be on the classpath in a similar manner to the existing
CloudFoundry discovery endpoint.
Closes gh-9901
Unfortunately, creating the schema in code did not offer the right
condition to reproduce the error scenario. This commit restore the
initial intent, but separating the configuration and cleaning the
created context properly.
See gh-9862
Rename `ApplicationContextTester` and related classes to
`ApplicationContextRunner` and refactor existing tests to use correctly
named variables.
See gh-9875
Previously, if a name contained part of a regex but wasn't actually
a regex, a PatternSyntaxException would be thrown and the request
would fail.
This commit updates NamePatternFilter to catch PatternSyntaxException
and treat the regex-like input as a name insteead.
See gh-9730
Previously, HealthMvcEndpoint stored the cached Health and its last
access time in two separate fields. Neither field was volatile and
no synchronization was used. This meant that there were potential
visibility problems. In a possible worst case scenario one field may
see the updated access time but an old health so it would incorrectly
believe that the old health was up-to-date and return it.
This commit reworks the endpoint to store the cached health and the
time at which it was created in a single, volatile field. This ensures
that the cached health and its creation time will be visible across
threads. Note that a race between threads when the cache is stale is
still possible. This race may result in multiple calls to the
delegate but these should be harmless.
Closes gh-9454
Elastic have announced [1] that embedded Elasticsearch is no longer
supported. This commit brings us into line with that announcement by
removing the auto-configuration that would create an Elasticsearch
Node and NodeClient.
To use the Elasticsearch auto-configuration, a user must now provide
the address of one or more cluster nodes
(via the spring.elastisearch.cluster-nodes property) which will then
be used to create a TransportClient.
See gh-9374
[1] https://www.elastic.co/blog/elasticsearch-the-server
Remove test-jar artifacts from Maven projects and relocate classes. The
majority of utilities now live in the `spring-boot-testsupport` module.
This update will help us to deploy artifacts using the standard Maven
deploy plugin in the future (which doesn't support the filtering of
individual artifacts).
Fixes gh-9493
This commit ensures that `setLogLevel` on the `LoggingSystem` accepts
a `null` level. A `null` level means any customization sets on that
level should be removed and the default configuration should be used
instead.
Effectively, the level of the parent logger is going to be used when
`setLevel` is called with `null` for a given logger.
Most JMX clients do not accept to pass `null` for an argument so an
empty String is translated to null in that specific case.
Closes gh-8776
This change aligns ErrorAttributes with ResponseEntityExceptionHandler
which takes a WebRequest as a parameter of its handleException method.
WebRequest extends RequestAttributes and provides access to much more
than just the request's attributes. For example request headers and
parameters are available from WebRequest.
Closes gh-7952
Closes gh-6555