Remove code from `LogbackLoggingSystem.loadDefaults` that sets Logback
context properties from the Spring Environment. The code should not be
required since `LoggingSystemVariables` will have already set system
variables for the logging config to use.
Closes gh-23767
This commit makes sure to defer registration of hibernate statistics
outside of the singleton lock as it can lead to deadlocks when the
EntityManagerFactory is initialized in deferred mode.
Closes gh-23740
This commit adds support for platform API 0.4 when invoking a CNB
builder in the Maven and Gradle plugins. If the builder advertises
that it supports platform API 0.4 then that version will be
requested when invoking lifecycle phases. Otherwise the plugins
will fall back to requesting platform API 0.3.
Requesting platform API 0.4 when invoking builder lifecycle phases
has the primary benefit of making it easier to pass command-line
arguments to the default process in the generated image.
Fixes gh-23692
This commit polishes the javadoc for Maven plugin classes now that
the plugin reference docs link to the javadoc. Visibility of some
MOJO parameter class getters and setters were also changed for
consistency.
See gh-21555
Previously, the shutdown hook was only registered once refresh has
completed. If the JVM was shut down during refresh (or after refresh
and before the hook was registered) the hook wouldn't run and the
partially refreshed context would not be cleaned up.
This commit moves the registration of the shutdown hook to before
refresh processing begins. This ensures that the hook is available
to clean up the context if the JVM is shutdown while refresh is in
progress.
Fixes gh-23625
This commit modifies the documentation generated for the
Maven plugin to include links to javadoc when Spring
Boot types are mentioned. Some javadoc was also polished
to improve the generated docs.
Fixes gh-21555
Refactor `ConfigData` processing code to make it less awkward to
follow.
Prior to this commit the `ConfigDataLocationResolver` would take a
String location and return a `ConfigDataLocation` instance. This was
a little confusing since sometimes we would refer to `location` as the
String value, and sometimes it would be the typed instance. We also
had nowhere sensible to put the `optional:` prefix logic and we needed
to pass a `boolean` parameter to a number of methods. The recently
introduced `Orgin` support also didn't have a good home.
To solve this, `ConfigDataLocation` has been renamed to
`ConfigDataResource`. This frees up `ConfigDataLocation` to be used
as a richer `location` type that holds the String value, the `Orgin`
and provides a home for the `optional:` logic.
This commit also cleans up a few other areas of the code, including
renaming `ResourceConfigData...` to `StandardConfigData...`. It also
introduces a new exception hierarchy for `ConfigDataNotFoundExceptions`.
Closes gh-23711
Update `SpringApplication` so that `FailureAnalyzers` apply even if
the `ApplicationContext` was not created. If no `ApplicationContext`
is available, only `FailureAnalyzer` instances that do not implement
any `Aware` interfaces are considered.
Closes gh-23710
Previously, when building a layered jar with Gradle, project
dependencies were treated the same as any other dependency, being
included in the dependencies or snapshot dependencies layer based
on their version.
This commit updates the default layering when using Gradle to include
project dependencies in the application layer by default. The DSL has
also been updated to allow their layer to be customized using new
includeProjectDependencies() and excludeProjectDependencies() methods
rather than relying on including and excluding them via a
group:artifact:version pattern.
Closes gh-23431
This commit upgrades to Liquibase 3.10.3 and adds an explicit exclude
check as this version started to include a "banner.txt" at the root of
the classpath. Given it may override a banner configured by the user it
is ignored so that the default banner is displayed.
Users impacted by this change can rename their banner and configure the
"spring.banner.location" property to point to it.
Closes gh-23658
When Kubernetes mounts config maps onto volumes in a pod, it creates
hidden files on the pod filesystem with symbolic links to the
hidden files. The symlinks are named for the user-provided config
map that was mounted, while the hidden files have system-generated
names.
Prior to this commit, the property sources created by the
configtree property source were added to the environment using the
system-generated hidden file name instead of the user-provided
symlink name. This commit corrects that behavior so the property
sources are named as a user would expect.
Fixes gh-23232
The CNB specifications allow builders to support multiple platform
API versions. The supported versions are published in the builder
image metadata as an array of version numbers, while a single
supported version number was published in earlier builder metadata.
These changes read the supported versions from the builder metadata
and fall back to the single version if the array is not present.
A CNB_PLATFORM_API environment variable is set on each lifecycle
phase invocation to request a specific version as recommended in
the CNB platform spec.
Fixes gh-23682