Update the `ConfigDataEnvironment` so that the `resolveProfileSpecific`
method of `ConfigDataLocationResolver` is no longer called when
resolving imports declared in a profile-specific file.
Fixes gh-26753
Update `StandardConfigDataLocationResolver` so that profile-specific
imports can only be used when there is no parent import.
Prior to this commit, given the following application.properties file:
spring.profiles.active=p1,p2
spring.config.import=other.properties
We would attempt to import `other.properties`, `other-p1.properties`
and `other-p2.properties`. This seems quite confusing and when we really
only need to support profile-specific properties for the initial root
set of locations.
Fixes gh-26752
Update `JarFile` and `JarFileWrapper` classes so that they no longer
close the `JarFile` early if a `SecurityManager` is in use.
Prior to this commit, the closed `JarFile` would cause (an ultimately
swallowed) NPE in `ZipFile` which manifested itself as a
`ClassNotFoundException` when starting the app.
Closes gh-25538
When a custom buildpack is provided for image building, the contents
of the buildpack directory, tgz file, or image are copied as tar
entries to a new layer in the ephemeral builder image. Prior to this
commit, only file entries from the buildpack source were copied as
builder layer tar entries; intermediate directory entries from the
source were not copied. This results in directories being created in
the builder container using default permissions. This worked on most
Linux-like OSs where the default permissions allow others-read
access. On some OSs like Arch Linux where the default directory
permissions do not allow others-read, this prevented the lifecycle
processes from reading the buildpack files.
This commit explicitly creates all intermediate directory tar entries
in the builder image layer to ensure that the buildpack directories
and files can be read by the lifecycle processes.
Fixes gh-26658
This commit aligns int and long so that a random number is generated
by delegating to ints/longs in the JDK's Random API. In the case of a
single bound value, it needs to be greater than 0 because 0 is used as
the lower bound.
Fixes gh-26628
Previously, LoggingSystem#get would chose Logback by the sole presence
of a class in logback-core, with the assumption that logback-classic is
also on the classpath. An app that only had the former would therefore
fail.
This commit updates the condition to check for a class in
logback-classic instead.
Closes gh-26711
Update `ImageName` and `ImageReference` to use distinct regex patterns
to parse specific parts of the value. Prior to this commit a single
regex pattern was used which could hang given certain input strings.
Fixes gh-23115
Change `SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME` from package
private to public so that it can be accessed in user build scripts.
Fixes gh-26686
Fix `DataSourceBuilder` so that the type used to access `deriveFrom`
properties is based on the actual instance type rather than the
user-defined type which could have been changed.
Fixes gh-26644
Update `DataSourceBuilder` so that the `driverClassName` may be optional
and silently ignored if it set but the underlying type does not have
a getter/setter.
This restores Spring Boot 2.4 behavior.
Fixes gh-26631
Co-authored-by: Phillip Webb <pwebb@vmware.com>
Update `DataSourceBuilder` so that setters are not longer called for
`null` values. This restores Spring Boot 2.4 behavior.
Fixes gh-26633
Co-authored-by: Phillip Webb <pwebb@vmware.com>
Update `DataSourceBuilder` so that the url property attempts both
`getUrl()` / `setUrl(...)` and `getURL()`/`setURL(...)`.
Fixes gh-26647
Co-authored-by: Phillip Webb <pwebb@vmware.com>
Update `StandardConfigDataLocationResolver` so that directory resources
are only required when the location is not optional.
Closes gh-26627
Co-authored-by: Phillip Webb <pwebb@vmware.com>
Update `ConfigData` so that it signal if is considered optional. This
update allows `ConfigDataLocationResolvers` to return results that
behave in the same way as `optional:` prefixed locations without the
user themselves needing to prefix the location string.
Closes gh-25894
Update `ManagementWebSecurityAutoConfiguration` so that the
`managementSecurityFilterChain` bean has an explicit order.
Prior to this commit, the `managementSecurityFilterChain` would override
the `securityFilterChain` in `RemoteDevtoolsSecurityConfiguration` which
would prevent the remote devtools endpoint from being accessed.
See gh-25868
Update `StandardConfigDataLocationResolver` to deal with patterns when
resolving empty directories. This update also fixes the handling of
mandatory pattern locations which would previously throw an exception.
The error message returned when a location with a pattern does not
contain any subdirectories has also been improved.
Fixes gh-26468
Fixes gh-26577
Fixes gh-26415
Update `Profiles` so that any profiles set programmatically on the
`Environment` are merged with `spring.profiles.active` properties.
Fixes gh-26151
Co-authored-by: Phillip Webb <pwebb@vmware.com>