Without this change we're missing the BaggageTextMapPropagator for
OTel. This means that we're not propagating remote-fields
(only baggage via the 'baggage' field).
With this change we're adding the missing propagator as
THE LAST entry in the composite TextMapPropagator. It has to be
last cause with the latest Snapshots of Micrometer Tracing it
will append the remote field baggage to existing baggage in the
context extracted via the W3CBaggagePropagator.
See gh-32898
Without those changes, if @AutoConfigureTestDatabase is used, the
native image build process fails with:
EmbeddedDatabaseConnection was unintentionally initialized at build
time.
Closes gh-32865
Update `EventPublishingRunListener` to ensure that application event
listeners are always refreshed before multicasting initial events.
Prior to this commit, refreshing occurred after multicasting which
meant that listeners added by a different `SpringApplicationRunListener`
would not be picked up. This caused properties from tests that have
`UseMainMethod` set to `ALWAYS` or `WHEN_AVAILABLE` to be missing.
Fixes gh-32860
Refactor the way `ClientHttpRequestFactory` instances are created in
order to support setting read timeouts.
Prior to this commit, the reflection based approach would call
`setReadTimeout`. As of Spring Framework 6.0, the
`HttpComponentsClientHttpRequestFactory` class no longer supports this
approach. The timeout must be set on the `HttpClientConnectionManager`
used in the `HttpClient` which can be passed in to the constructor.
In order to support this approach, the `ClientHttpRequestFactory` can
now be created using a `Function` rather than a `Supplier`. The
function accepts a `ClientHttpRequestFactorySettings` which provides
the timeout settings to apply.
The `ClientHttpRequestFactories` utility class provides methods to
create `ClientHttpRequestFactory` instances that respect the settings.
Whenever possible, these are created without using reflection.
Fixes gh-32857
Co-authored-by: Phillip Webb <pwebb@vmware.com>
This commit adds a `Build-Jdk-Spec` attribute to the manifest in a
jar or war file built with the Spring Boot Gradle plugin. This
aligns the Gradle plugin's behavior with the default Maven plugin
behavior.
This removes the need to set a `BP_JVM_VERSION` environment variable
when invoking Cloud Native Buildpacks, as the Paketo buildpacks will
honor `Build-Jdk-Spec` in a jar or war manifest to determine the
default JVM version.
Fixes gh-32829
After AOT processing, a HttpGraphQlTester bean will be defined directly
so the context customizer that initiates its registration is not
needed.
Closes gh-32872
After AOT processing, a WebTestClient bean will be defined directly
so the context customizer that initiates its registration is not
needed.
Closes gh-32859
After AOT processing, a TestRestTemplate bean will be defined
directly so the context customizer that initiates its registration is
not needed. We'd already disabled the registrar but this is
insufficient in Graal 22.3 which fails fast when the customizer tries
to reference the registrar.
Fixes gh-32848
Logback can infer the Java class to which an XML tag should be mapped
by looking for a setter method on the class to which the parent tag
was mapped. This commits ensures that reflection hints are added for
such classes.
Fixes gh-32839