Commit Graph

315 Commits (352a6671e814c796d036f68b13f946c0fe28d2ab)

Author SHA1 Message Date
Madhura Bhave b93c2b9a9f Allow actuator endpoints to be used with mvcMatchers
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
6 years ago
Andy Wilkinson 3e093035b4 Merge branch '1.5.x' into 2.0.x 6 years ago
Johnny Lim 5f3f1a1f11 Polish
Closes gh-14067
6 years ago
Johnny Lim b4abccc07c Polish
See gh-14049
6 years ago
Andy Wilkinson 27f5e46587 Polish "Fix NPE in FlywayEndpoint when migration.installedOn is null"
Closes gh-14019
6 years ago
artsiom 83fbdc6ea8 Fix NPE in FlywayEndpoint when migration.installedOn is null
See gh-14019
6 years ago
Stephane Nicoll a023bd030a Add configurable timeout for Couchbase health indicator
This commit makes sure to use a configurable timeout to check if the
Couchbase cluster is up, rather than relying on the default that can be
quite long.

Closes gh-13879
6 years ago
Stephane Nicoll fbf3c48bf8 Fix setter detection in `configprops` endpoint
Previously, the setter of a property whose second letter is upper-case (
such as `oAuth2Uri`) was not detected properly. The JavaBean spec states
that, in such a case, the first letter should not be capitalized (i.e.
the setter should be `setoAuth2Uri` rather than `setOAuth2Uri`).

This commit makes sure that Jackson uses standard bean names and fixes
the setter detection algorithm to take this case into account.

Closes gh-13878
6 years ago
Stephane Nicoll f731f6aa39 Restore customization of HTTP trace request headers
This commit restore the use of the `postProcessRequestHeaders` method
when overridden in a custom HttpExchangeTracer implementation.

Closes gh-13924
6 years ago
Stephane Nicoll 4e45f36bd1 Clean basePath if necessary
This commit makes sure that ServletEndpointRegistrar does not add a
duplicate `/` if the basePath is suffixed with it already

Close gh-13964
6 years ago
Phillip Webb aeb885192e Polish ternary expressions 6 years ago
Phillip Webb 63b609827e Fix checkstyle method order issues
Fix checkstyle issues with method ordering following the
spring-javaformat upgrade.

See gh-13932
6 years ago
Phillip Webb e6a68b39a3 Fix checkstyle javadoc issues
Fix checkstyle issues in javadoc following the spring-javaformat
upgrade.

See gh-13932
6 years ago
Phillip Webb 7fc455654a Fix checkstyle ternary issues
Fix checkstyle issues with ternary expressions following the
spring-javaformat upgrade.

See gh-13932
6 years ago
Phillip Webb 9a9111af21 Support path discovery for main dispatcher servlet
Add an `DispatcherServletPath` interface which provides a much more
consistent way to discover the path of the main dispatcher servet.

Prior to this commit, auto-configurations would often make use of the
`ServerProperties` class to discover the dispatcher servlet path. This
mechanism isn't very explicit and also makes it hard for us to relocate
that property in Spring Boot 2.1.

This commit also reverts most of fddc9e9c7e since it is now clear that
the supporting multiple dispatcher servlet paths will be much more
involved that we originally anticipated.

Closes gh-13834
6 years ago
Stephane Nicoll a25b6bd473 Restore support for TransactionAwareCacheDecorator
This commit makes sure to unwrap any transaction aware cache before
collecting metrics for them.

Closes gh-13861
6 years ago
Stephane Nicoll 829ac3fbef Prevent headers to be mutated
This commit rework 1189ccc to prevent a mutate call on the original
headers map.

Closes gh-13871
6 years ago
Stephane Nicoll 1a0afc6bbe Polish "Use Collection.removeIf() where possible"
Closes gh-13871
6 years ago
dreis2211 1189ccc936 Use Collection.removeIf() where possible
See gh-13871
6 years ago
Johannes Edmeier ab1f8cf77b Add metric description and base unit to metrics endpoint
See gh-13813
6 years ago
Stephane Nicoll 592754d806 Polish "Make sure exception tag values are not empty in web metrics"
Closes gh-13187
6 years ago
Jon Schneider ee37dc1c31 Make sure exception tag values are not empty in web metrics
See gh-13187
6 years ago
Andy Wilkinson a57d0f0853 Reinstate order of WebMvcMetricsFilter
Closes gh-13781
6 years ago
Andy Wilkinson cced3514a7 Polish 6 years ago
Stephane Nicoll 3423c5dddb Detect DispatcherServlets registered via ServletRegistrationBean
Previously, when a DispatcherServlet was registered via a
ServletRegistrationBean, the mappings endpoint did not expose any
information about it as it wasn't detected.

This commit fixes the detection of available DispatcherServlets in the
context so that the mappings endpoint include them all.

Closes gh-13186
6 years ago
Johnny Lim 46e6aa5963 Fix query string encoding in TraceableHttpServletRequest
Closes gh-13545
6 years ago
Johnny Lim 0de8317979 Separate logging from getUrlMappings()
Closes gh-13710
6 years ago
Johnny Lim ab6adc8265 Polish
Closes gh-13616
6 years ago
Madhura Bhave fddc9e9c7e Support multiple paths in DispatcherServletPathProvider
Closes gh-13603
6 years ago
Andy Wilkinson a5d20ffed7 Avoid NPE when creating method tag for WebFlux req with non-standard method
Previously, a NullPointerException would occur when WebFluxTags
attempted to create a method Tag for a request with a non-standard
method.

This commit updates WebFluxTags to use getMethodValue(), which will
never return null, rather than getMethod(), which may return null,
when determining the tag's value for the given request.

Closes gh-13596
6 years ago
Andy Wilkinson 911453d478 Merge branch '1.5.x' into 2.0.x 6 years ago
Madhura Bhave ed734d7e43 Trace filter ignores invalid requests
Fixes gh-12987
7 years ago
Phillip Webb 571c50e43f Switch to functional web code to use static imports
Update the samples and tests to use the more idiomatic static import
style.
7 years ago
Madhura Bhave 60a4d67b13 Handle special characters in TraceableHttpServletRequest
Fixes gh-13273
7 years ago
Andy Wilkinson ea51cfabca Avoid uri tag explosion when use of path variable is undetected
Previously, WebMvcTags would fall back to using the request’s path
info if Spring MVC’s best matching path pattern attribute was not
available. For non-Spring MVC web frameworks that support path
variables, such as Jersey, this led to an explosion of URI tags that
could exhaust the heap.

Closes gh-12447
7 years ago
Stephane Nicoll faa9910e46 Enable cache when a SecurityContext parameter is used
This commit restores caching for the main read operation when the
SecurityContext does not expose a principal (i.e. guest access).

Closes gh-13238
7 years ago
Stephane Nicoll 4259817572 Fix extension discovery when endpoint instance is sub-classed
This commit fixes endpoint extension discovery when the related endpoint
is sub-classed. Previously, a strict by type check was applied against
the `endpoint` attribute of `EndpointExtension`.

Rather than using a `Class` check, this commit extracts the id of an
endpoint and uses it to match its extension, if any.

Closes gh-13082
7 years ago
Johnny Lim bd2053aa17 Use more Tag constants
Closes gh-13286
7 years ago
Johnny Lim f385a1cb11 Polish
Closes gh-13243
7 years ago
Phillip Webb 2dc4f1df00 Polish 7 years ago
Johnny Lim 75639aa682 Polish
Closes gh-13192
7 years ago
Stephane Nicoll 2be1c8f527 Polish "Set classloader for JMX endpoints to application classloader"
Closes gh-12209
7 years ago
David Herberth e44c81672f Set classloader for JMX endpoints to application classloader
See gh-12209
7 years ago
dreis2211 e6a23fa3ff Remove unnecessary semicolons
Closes gh-13144
7 years ago
Andy Wilkinson c826310fd1 Polish 7 years ago
Phillip Webb 975e986fef Polish 7 years ago
Phillip Webb 5b3cb8a698 Update copyright header year for changed files 7 years ago
Phillip Webb 57bfbfb3ad Fix checkstyle errors 7 years ago
Phillip Webb 6e09e497f2 Formatting 7 years ago
Phillip Webb 2d70a7ae5e Polish caught exception names
Prefer `ex` over `e`.
7 years ago