18989 Commits

Author SHA1 Message Date
Moritz Halbritter
65c68ba64e Reinstate old flyway bean method
Closes gh-32849
2022-10-27 10:15:58 +02:00
Moritz Halbritter
cd5d2ad3e8 Revert "Extract Flyway configuration mapping in separate class"
This reverts commit cf4117856b1656c24753aae045300f8a3a7c80c5.
2022-10-27 10:08:27 +02:00
Moritz Halbritter
cf4117856b Extract Flyway configuration mapping in separate class
Closes gh-32849
2022-10-27 09:53:29 +02:00
Marcin Grzejszczak
b753170807 Add missing BaggageTextMapPropagator for OTel W3C
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
2022-10-27 09:33:33 +02:00
Moritz Halbritter
1f0cf1ac2b Make EmbeddedDatabaseConnection GraalVM compatible
Without those changes, if @AutoConfigureTestDatabase is used, the
native image build process fails with:

  EmbeddedDatabaseConnection was unintentionally initialized at build
  time.

Closes gh-32865
2022-10-27 09:21:19 +02:00
Scott Frederick
eeac08e50e Remove references to WebSecurityConfigurerAdapter from javadoc
Closes gh-32879
2022-10-26 16:55:10 -05:00
Moritz Halbritter
0985e3d237 Add resource hint for banner.txt
Closes gh-32882
2022-10-26 15:59:50 +02:00
Phillip Webb
a59b6cb1f3 Polish 2022-10-25 21:56:53 -07:00
Phillip Webb
0f405c06bf Merge branch '2.7.x' 2022-10-25 16:40:56 -07:00
Phillip Webb
f44531a7a2 Merge branch '2.6.x' into 2.7.x 2022-10-25 16:02:04 -07:00
Phillip Webb
92b513dc8d Polish 2022-10-25 16:01:58 -07:00
Phillip Webb
4be3218cb6 Merge branch '2.7.x' 2022-10-25 15:48:26 -07:00
Phillip Webb
c8676a81de Merge branch '2.6.x' into 2.7.x 2022-10-25 15:48:04 -07:00
Phillip Webb
d7ac20cd6c Update copyright year of changed files 2022-10-25 15:47:30 -07:00
Phillip Webb
9505673d6f Ensure application event listeners are always refreshed
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
2022-10-25 15:41:57 -07:00
Phillip Webb
159910b0d9 Polish 2022-10-25 14:49:04 -07:00
Andy Wilkinson
e6c37d698f Reinstate support for read timeouts with RestTemplateBuilder
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>
2022-10-25 14:41:19 -07:00
Scott Frederick
c22e76632c Add Build-Jdk-Spec to jar and war manifest when building with Gradle
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
2022-10-25 15:48:05 -05:00
Moritz Halbritter
383d6c897f Remove reflection for SimpleRequestExpectationManager creation
Closes gh-32867
2022-10-25 16:15:51 +02:00
Moritz Halbritter
9ee3fd0b0b Disable HttpGraphQlTesterContextCustomizer after AOT processing
After AOT processing, a HttpGraphQlTester bean will be defined directly
so the context customizer that initiates its registration is not
needed.

Closes gh-32872
2022-10-25 14:02:55 +02:00
Andy Wilkinson
99edda735e Polish 2022-10-25 12:57:58 +01:00
Moritz Halbritter
b014039a34 Disable WebTestClientContextCustomizer after AOT processing
After AOT processing, a WebTestClient bean will be defined directly
so the context customizer that initiates its registration is not
needed.

Closes gh-32859
2022-10-25 13:51:43 +02:00
Moritz Halbritter
f2c004f604 Remove reflection in OutputCaptureExtension
Closes gh-32870
2022-10-25 11:42:52 +02:00
Moritz Halbritter
512a4c7544 Revert "Register runtime hints for OutputCapture"
This reverts commit 35abc3a6dcbacf9e5ae3f1b06ba3f60c8ca79b8c.
2022-10-25 11:40:44 +02:00
Moritz Halbritter
35abc3a6dc Register runtime hints for OutputCapture
Closes gh-32870
2022-10-25 11:29:12 +02:00
Andy Wilkinson
f11945b961 Start building against Spring Framework 6.0.0-RC3 snapshots
See gh-32856
2022-10-24 12:19:16 +01:00
Andy Wilkinson
b7fb345709 Revert workaround for multiple ImportRuntimeHints
Closes gh-32830
2022-10-24 10:20:50 +01:00
Andy Wilkinson
b78e7b5ac7 Disable TestRestTemplateContextCustomizer after AOT processing
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
2022-10-24 10:18:08 +01:00
Moritz Halbritter
605dd3d4bd Polish docs 2022-10-24 11:01:30 +02:00
Andy Wilkinson
9e6259cd37 Remove development-only dependencies from native image classpath
Fixes gh-32843
2022-10-24 09:22:13 +01:00
Andy Wilkinson
b0b2818f0b Improve type discovery in Logback AOT contribution
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
2022-10-21 16:38:52 +01:00
Andy Wilkinson
eebe23a081 Make all AOT-generated resources available to native-compile
Fixes gh-32841
2022-10-21 16:38:52 +01:00
Moritz Halbritter
ff6d9aa881 Polish "Add micrometer tracing documentation" 2022-10-21 14:51:19 +02:00
Andy Wilkinson
bed313746b Correct property names to align with changes in 3.0
See gh-32837
2022-10-21 12:23:07 +01:00
Johnny Lim
fc61690675 Add missing @Test to sanitizeLists()
See gh-32792
2022-10-21 12:05:44 +01:00
Andy Wilkinson
a606b26920 Merge branch '2.7.x'
Closes gh-32837
2022-10-21 11:04:52 +01:00
Andy Wilkinson
032487117b Merge branch '2.6.x' into 2.7.x
Closes gh-32836
2022-10-21 11:04:09 +01:00
Andy Wilkinson
fe51e03019 Support IPv6 addresses in spring.redis.sentinel.nodes
Fixes gh-32762
2022-10-21 10:53:54 +01:00
Moritz Halbritter
e999513838 Add micrometer tracing documentation
Closes gh-30658
2022-10-21 10:04:40 +02:00
Sébastien Deleuze
4e131bd627 Provide a workaround to allow multiple @ImportRuntimeHints
Provide a workaround for spring-projects/spring-framework#29361 so
that multiple `@ImportRuntimeHints` can be used in a type hierarchy.

The commit should cover Actuator web endpoint use cases with the
exception of Cloud Foundry endpoints which are not possible due to
package access issues.

See gh-29361
2022-10-20 17:12:58 -07:00
Phillip Webb
ea094ddba6 Fix package tangles caused by ConfigurationProperties hints
Relocate `ConfigurationPropertiesReflectionHintsProcessor` and refactor
it to be a general purpose `BindableRuntimeHintsRegistrar`.

Prior to this commit, `ConfigurationPropertiesReflectionHintsProcessor`
was used to declare binding hints for classes that were bound, but
might be `@ConfigurationProperties`. By moving and renaming the class,
it's now better aligned to the way it's used.

Support for `@NestedConfigurationProperties` has been implemented by
adding a `@Nestable` meta-annotation. This allow us to create the
appropriate hints, without the `Binder` needing to be directly aware of
the `@NestedConfigurationProperties` annotation.

Closes gh-32815
2022-10-20 17:05:54 -07:00
Phillip Webb
eb1d72e7b7 Merge branch '2.7.x' 2022-10-20 17:05:49 -07:00
Phillip Webb
d8c4aec946 Merge branch '2.6.x' into 2.7.x 2022-10-20 17:04:37 -07:00
Phillip Webb
1a14f39f83 Polish 2022-10-20 17:04:29 -07:00
Phillip Webb
7db93aeb90 Merge branch '2.7.x'
Closes gh-32827
2022-10-20 15:20:15 -07:00
Phillip Webb
1c7bff7cc1 Merge branch '2.6.x' into 2.7.x
Closes gh-32826
2022-10-20 15:01:00 -07:00
Phillip Webb
463a614d27 Fix package tangle between SpringApplication and Environment types
Update `SpringApplication` so that it no longer directly decides the
type of `Environment` that should be created.

Closes gh-32825
2022-10-20 14:51:13 -07:00
Scott Frederick
072ce5c151 Fix versions in documentation links
Fixes gh-32772
2022-10-20 14:59:14 -05:00
Scott Frederick
b78b22b6f6 Allow Gradle task property to be set with String or enum value
See gh-32769
2022-10-20 13:59:54 -05:00
Phillip Webb
c53c8c84b8 Fix annotation processor to deal with relocated @ConstructorBinding
Update `ConfigurationMetadataAnnotationProcessor` to use the correct
location for the `@ConstructorBinding` annotation and to deal with
finding it as a meta-annotation.

Closes gh-32660
2022-10-20 10:19:57 -07:00