This commit changes the default file extension for Freemarker templates
from `*.ftl` to `*.ftlh`. This commit also enables by default the
Freemarker setting `"recognize_standard_file_extensions"` to ensure that
HTML escaping is performed by default in Spring Boot applications.
Applications should adapt to this change by changing the file extensions
of existing templates to `.ftlh`.
Closes gh-15131
This commit changes AbstractWebMvcEndpointHandlerMapping to
be a MatchableHandlerMapping. Additionally, EndpointRequest,
now delegates to MvcRequestMatcher for Spring MVC applications.
For all other applications, AntPathRequestMatcher is used as
a delegate.
Closes gh-13962
As discussed in gh-11872, `TestRestTemplate` constructor variants taking
a `RestTemplate` argument are confusing since the main goal of that
class is to mutate `RestTemplate`.
This commit removes all those constructor variants and replaces them
with `RestTemplateBuilder` arguments when possible.
Closes gh-11872
Add `@ControllerEndpoint` and `@RestControllerEndpoint` annotations that
can be used to develop a Spring-only request mapped endpoint. Both
Spring MVC and Spring WebFlux are supported.
This feature is primarily for use when deeper Spring integration is
required or when existing Spring Boot 1.5 projects want to migrate to
Spring Boot 2.0 without re-writing existing endpoints. It comes at the
expense of portability, since such endpoints will be missing from
Jersey.
Fixes gh-10257
Refactor several areas of the actuator endpoint code in order to make
future extensions easier. The primary goal is to introduce the concept
of an `ExposableEndpoint` that has technology specific subclasses and
can carry additional data for filters to use. Many other changes have
been made along the way including:
* A new EndpointSupplier interface that allows cleaner separation of
supplying vs discovering endpoints. This allows cleaner class names
and allows for better auto-configuration since a user can choose to
provide their own supplier entirely.
* A `DiscoveredEndpoint` interface that allows the `EndpointFilter`
to be greatly simplified. A filter now doesn't need to know about
discovery concerns unless absolutely necessary.
* Improved naming and package structure. Many technology specific
concerns are now grouped in a better way. Related concerns are
co-located and concepts from one area no longer leakage into another.
* Simplified `HandlerMapping` implementations. Many common concerns have
been pulled up helping to create simpler subclasses.
* Simplified JMX adapters. Many of the intermediary `Info` classes have
been removed. The `DiscoveredJmxOperation` is now responsible for
mapping methods to operations.
* A specific @`HealthEndpointCloudFoundryExtension` for Cloud Foundry.
The extension logic used to create a "full" health endpoint extension
has been made explicit.
Fixes gh-11428
Fixes gh-11581
This commit moves management.server.context-path to
management.server.servlet.context-path to align with the configuration
key for the application's main context path.
Closes gh-11359
Now that Spring Boot supports Freemarker for both Spring MVC and Spring
WebFlux, the dedicated starter should not pull the Web starter
transitively and let developers manually choose the web stack.
Closes gh-11246
Drop the status endpoint and merge functionality back into the health
endpoint. The `management.endpoint.health.show-details` property can
be used to change if full details, or just the status is displayed.
Fixes gh-11113