This commit adapts SpringBootTest when it has to use a main method to
detect package private main method as well as main methods that do not
have any arguments.
Closes gh-48271
Replace calls to the recently deprecated `setConnectionTimeout` method
of `HttpComponentsClientHttpRequestFactoryBuilder`.
This commit also introduces a `withConnectionConfigCustomizer` and
allows connection timeouts settings to be used.
Closes gh-48031
Replace calls to the recently deprecated `setConnectionTimeout` method
of `HttpComponentsClientHttpRequestFactory` and align the HTTP client
builder with the HTTP async client builder.
This commit also introduces a `withConnectionConfigCustomizer` and
allows connection timeouts settings to be used.
Closes gh-47940
Previously, the Kotlin API docs included Java APIs. This commit
corrects this by suppressing all Dokkatoo source sets other than
main (main in src/main/kotlin, javaMain is src/main/java).
Dokkatoo is sensitive to the order in which plugins are applied. This
commit adapts to the sensitivity by changing the order in which
the Dokatoo and Kotlin JVM plugins are applied. This prevents the
Dokatoo plugin for overwriting the configuration that's applied by
our Kotlin conventions.
Closes gh-47763
Update `OutputCapture` to fix a race condition that could occur due to the
cache. Prior to this commit, when data was written whilst simultaneously
being read, any subsequent reading of data might miss the last output.
See gh-46685
Signed-off-by: Daniel Schmidt <daniel-github@ad-schmidt.de>
Align redirect settings of `TestRestTemplate` with other blocking
clients and deprecate `HttpClientOption.ENABLE_REDIRECTS`. A new
`withRedirects` convenience method has also been added to quickly
allow the setting to be changed.
Closes gh-43431
Replace `CustomHttpComponentsClientHttpRequestFactory` with
`HttpComponentsClientHttpRequestFactoryBuilder` to reduce the amount
of duplicated logic.
Closes gh-43422
META-INF/spring.factories and META-INF/spring/aot.factories in the
main source set are now checked. The checks verify that:
- Each class listed in the values exists in the source set's output
- The classes are listed alphabetically
- Nested classes are identified using their binary name
Closes gh-44676
This commit revisits the existing GraphQL configuration properties to
better reflect which ones belong to specific transports.
This also relaxes the Web auto-configurations to only require the
`ExecutionGraphQlService` as a bean. The `GraphQlSource` is now an
optional bean dependency.
Closes gh-44495
This commit makes sure to register the necessary hints to invoke the
main method of any bean available in the context. This is necessary
for tests that use the UseMainMethod feature.
This generates more hints than strictly necessary as there isn't a
way to contribute hints based on a ContextLoader, see
https://github.com/spring-projects/spring-framework/issues/34513 for
more details.
Closes gh-44461
Add `requestFactorySettings` that accepts a `UnaryOperator` so that
the existing `requestFactorySettings` can be customized rather than
replaced.
Closes gh-43258
Update `TestRestTemplate` with a `withRequestFactorySettings` method
that can be used to change defaults such as `Redirects`.
This commit also restores the previous redirect defaults for HTTP
components where redirects would only be followed when the
`HttpClientOption.ENABLE_REDIRECTS` was specified.
Closes gh-43258
Add `redirects(...)` method to `RestTemplateBuilder` to allow redirect
customization. This new method is required in 3.4 since the default
redirect strategy for some clients has changed and users need a way
to restore the old behavior.
See gh-43258
Update `AbstractApplicationContextRunner` and `Configurations` to
allow registration of beans with a specific generated bean name. By
default, no name is generated, however, `AutoConfigurations` has been
updated to use bean names using the fully qualified class name.
The update brings `ApplicationContextRunners` closer the behavior of
a standard Spring Boot application where user `@Configuration` classes
are usually registered with a simple name and auto-configurations are
imported (via an `ImportSelector`) using a fully qualified name.
Fixes gh-17963
Co-authored-by: Stéphane Nicoll <stephane.nicoll@broadcom.com>
Co-authored-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
Co-authored-by: Dmytro Nosan <dimanosan@gmail.com>
Update `ClientHttpRequestFactoryBuilder` implementations to ensure
that all libraries have consistent redirect follow behavior. Following
of redirects is enabled by default.
The `ClientHttpRequestFactorySettings` may be used to change if
redirects should be followed. The `spring.http.client.redirects`
property may also be used to update the default behavior.
Closes gh-42879
Refactor the internals of `RestTemplateBuilder` so that the new
`ClientHttpRequestFactoryBuilder` is used to create
`ClientHttpRequestFactory` instance.
See gh-36266