Previously, serialization of a @ConfigurationProperties bean to JSON
would fail if:
- A property on the bean returned the bean (the bean was
self-referential)
- An exception was thrown when attempting to retrieve a property's
value.
This commit makes the serialization more defensive by skipping any
property that is affected by either of the problems described above.
Debug logging has been added to aid diagnosis of missing properties.
Closes gh-10846
Previously, bad request with no reason was included in the response.
This commit introduces the reason when invalid log level is sent in the
request.
Fixes gh-10588
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
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
CachePublicMetrics wasn't explicitly tested and was still using field
injection. This commit improves the situation in preparation of the fix
for gh-8984