Previously, LiquibaseEndpoint closed the JdbcConnection but did not
close the Database. When using a connection pool, this could leave the
underlying SQL Connection with its auto commit property set to false.
This commit updates LiquibaseEndpoint to close the Database. This
ensures that it resets that Connection's auto commit property to the
value that it had when the Database was configured to use the
Connection.
See gh-13559
Previously, if an HTTP request that used a templated URI was handled
by something other than Spring MVC, a potentially unbounded number of
metrics would be created. This happened because, in the absence of
Spring MVC's best matching pattern attribute, MetricsFilter would fall
back to using the request's path. If the handling route was templated,
MetricsFilter would be unaware and would record different metrics for
each different path, rather than a single metric for the matching
pattern.
This cimmit updates MetricsFilter so that it falls back to using
unmapped when Spring MVC's best matching pattern attribute is not
available. This ensures that an unbounded number of metrics will no
longer be created, at the cost of losing specific metrics for requests
that are not handled by Spring MVC and that do not use a templated
path.
Closes gh-5875
This commit updates all `toLowerCase()` and `toUpperCase` invocations to
use the variant that takes a `Locale` to avoid locale-specific side
effect.
Closes gh-12213
Previously, the env endpoint would use the entire environment to
get the value of each property in a source. This meant that when
there were multiple sources with the same property, the value from
the source with the highest precedence would be used for every
source that contains the property.
This commit update the endpoint to retrieve the value from the
property source that is being described, rather than resolving it
against all the environment's property sources.
Closes gh-10883
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