Commit Graph
687 Commits
Author SHA1 Message Date
Stéphane Nicoll 72eaeecd5c Allow other configures to run before PropertiesRestClientHttpServiceGroupConfigurer
Closes gh-48296
2025-11-26 16:06:24 +01:00
Andy Wilkinson 3e82ede609 Require spring-boot-restclient dependency to use TestRestTemplate
Previously, spring-boot-restclient was a required dependency of
spring-boot-resttestclient. This had the unwanted side-effect of
increasing the risk of the test classpath enabling auto-configuration
for RestClient.Builder when it was main code that needed such a bean.
This could lead to integration tests passing but the application
itself failing to start when its run through its main method.

This commit makes spring-boot-restclient an optional dependency of
spring-boot-resttestclient. As a result, a dependency on
spring-boot-resttestclient is no longer sufficient to auto-configure
a RestClient.Builder bean, although it is still sufficient to
auto-configure a RestTestClient bean.

Those that wish to use TestRestTemplate rather than migrating to
RestTestClient will now have to add a dependency on
spring-boot-restclient. This makes it presence more obvious. It now
has to be declared directly rather than being somewhat hidden due to
being pulled in transitively. The hope is that this will reduce the
chances of the dependency being accidentially on the test classpath
when main code requires it to be on the runtime classpath.

Fixes gh-48253
2025-11-25 14:38:33 +00:00
Maurice Zeijen a39adff3eb Corrected ProblemDetail mixin for XmlMapper.Builder
The ProblemDetailXmlMapperBuilderCustomizer applied the wrong
ProblemDetail mixin for the Jackson XmlMapper. Namely the
ProblemDetailJacksonMixin, which is intended for JSON.
Now the ProblemDetailJacksonXmlMixin is used instead.
The corresponding test also tested for the wrong XML output,
which has been adjusted.

Fixes gh-48222

Signed-off-by: Maurice Zeijen <mzeijen@bol.com>
2025-11-24 09:57:43 +01:00
Stéphane Nicoll 76cccc5842 Document correct replacement for spring.jackson.parser
See gh-48255
2025-11-23 20:03:33 +01:00
michaldo 6ad521cdfc Document correct replacement for spring.jackson.generator
See gh-48255

Signed-off-by: michaldo <michaldo@github.com>
2025-11-23 20:03:06 +01:00
Stéphane Nicoll 977be74768 Document replacement for removed "max-retries" properties
See gh-48023
Closes gh-48206
2025-11-21 10:59:42 +01:00
Andy Wilkinson 3becdc7d47 Move server.error properties to spring.web.error
Closes gh-48201
2025-11-20 11:55:23 +00:00
Andy Wilkinson 75da8b80ec Align restclient-test properties with module's name
Closes gh-48193
2025-11-20 09:20:02 +00:00
Andy Wilkinson 331e9bcbf7 Remove metadata for previously deleted property
Closes gh-48199
2025-11-20 09:15:42 +00:00
Andy Wilkinson 81ec7aeb70 Fix clashing bean name with JsonTest and Jacksons 2 and 3
Fixes gh-48198
2025-11-20 09:14:46 +00:00
Phillip Webb 2685f4bf29 Change tomcat and jetty runtime modules to starters
Change `spring-boot-tomcat-runtime` and `spring-boot-jetty-runtime`
into starter POMs and reduce the number of dependencies needed for
`spring-boot-tomcat` and `spring-boot-jetty`.

The runtime starters provide only the jars required to run the
embedded server along with the module jar itself (excluding transitive
dependencies) and `spring-boot-webserver` (excluding transitive
dependencies).

The build setup required for an executable jar is slightly different
between Maven and Gradle. For Maven, the regular module is put in the
`provided` scope. For Gradle, the regular module remains in main
configuration and the runtime jar is put in the `providedRuntime`
configuration. The reference documentation has been updated to
show how to configure things if starters are being used.

Manual testing has been performed to ensure that wars build with Maven
and Gradle work with both Tomcat and Jetty in both deployed and
`java -jar` modes.

Closes gh-48175
2025-11-19 21:59:03 -08:00
Moritz Halbritter 3a13d07301 Merge branch '3.5.x'
Closes gh-48182
2025-11-19 15:08:19 +01:00
Moritz Halbritter 968a85156d Merge branch '3.5.x' 2025-11-19 15:04:32 +01:00
Phillip Webb d4b9786b8b Merge branch '3.5.x'
Closes gh-48177
2025-11-18 17:08:35 -08:00
Stéphane Nicoll ae4bf3e501 Disable Elasticsearch client's sniffer by default
This commit switches the auto-configuration of Elasticsearch to not
contribute a client's sniffer by default.

This matches the best practices as describe in
https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how

Closes gh-48155
2025-11-18 23:03:25 +01:00
Stéphane Nicoll 44e29b654d Merge branch '3.5.x'
Closes gh-48171
2025-11-18 16:07:34 +01:00
Phillip Webb 2a9e6a2b93 Merge branch '3.5.x'
Fixes gh-48059
2025-11-17 11:39:19 -08:00
Stéphane Nicoll 971bd500d4 Polish "Add missing HttpClientSettingsPropertyMapper tests"
See gh-48145
2025-11-17 09:53:41 +01:00
Steve Armstrong 82fe577596 Add missing HttpClientSettingsPropertyMapper tests
See gh-48145

Signed-off-by: Steve Armstrong <stevearmstrong-dev@users.noreply.github.com>
2025-11-17 09:44:12 +01:00
Stéphane Nicoll 2e4566bd3d Polish 2025-11-17 09:42:06 +01:00
Stéphane Nicoll bc25b58c6f Remove outdated exclusions to commons-logging
Closes gh-48142
2025-11-15 10:53:09 +01:00
Stefan Würsten 9ccec12506 Move mime-mappings.properties to spring-boot-web-server
This commit moves mime-mapping.properties in the module that actually
uses it, rather than in the top-level spring-boot module.

See gh-48138

Signed-off-by: Stefan Würsten <stefan@wuersten.ch>
2025-11-14 14:52:54 +01:00
Andy Wilkinson 781035b409 Remove import of deleted auto-configuration class
See gh-47848
2025-11-14 11:14:36 +00:00
Andy Wilkinson e6f6ee78da Move ReactiveElasticsearchClient auto-config to correct module
Closes gh-47848
2025-11-14 09:39:46 +00:00
Andy Wilkinson b65fe6520a Merge branch '3.5.x'
Closes gh-48134
2025-11-14 08:57:57 +00:00
Andy Wilkinson 083a0a68af Polish "Add since to deprecations in config metadata JSON files"
This restores properties that were accidentally removed in the
changes for gh-48122.
2025-11-13 15:17:29 +00:00
Stéphane Nicoll a4ff1e51da Polish "Add since to deprecations in config metadata JSON files"
See gh-47972
See gh-47980
2025-11-13 15:45:46 +01:00
Stéphane Nicoll 3d23261f87 Merge branch '3.5.x'
Closes gh-48122
2025-11-13 14:55:19 +01:00
Andy Wilkinson bb0437c0e1 Correct names of isolated Json/ObjectMapper properties
Closes gh-48116
2025-11-13 12:00:19 +00:00
Andy Wilkinson 9cc18130e6 Merge branch '3.5.x'
Closes gh-48110
2025-11-13 10:19:47 +00:00
Stéphane Nicoll d1e5fe3248 Merge branch '3.5.x'
Closes gh-48106
2025-11-13 10:31:25 +01:00
Brian Clozel d161aafcdf Restrict Kotlin serialization when alternative is available
This commit applies similar changes already contributed to the
`HttpMessageConverter` stack for MVC applications.
Since there was no auto-configuration for Kotlinx JSON Serialization on
the reactive side, this commit adds a relevant `CodecCustomizer` that
will use an available `Json` bean and use it to configure a codec that:

* will only consider `@Serializable`-annotated types if another JSON
  library is available
* will use a broader support with Kotlinx Serialization otherwise

Fixes gh-48070
2025-11-12 21:09:39 +01:00
Andy Wilkinson eb381d642a Provide default values for Kotlinx Serialization JSON properties
Closes gh-48097
2025-11-12 19:50:20 +00:00
Andy Wilkinson 5699915383 Rename module for Kotlinx Serialization JSON support
Closes gh-48076
2025-11-12 17:34:28 +00:00
Brian Clozel 44f0c772a2 Configure JSON and XML converters on HttpMessageConverters
This commit ensures that XML and JSON converters on both client and
server are configured using the dedicated methods on
`HttpMessageConverters`, instead of pushing them ahead of default
converters.

Closes gh-47917
Fixes gh-48096
2025-11-12 16:15:13 +01:00
Stéphane Nicoll 73087f369b Merge branch '3.5.x'
Closes gh-48071
2025-11-12 13:08:31 +01:00
Andy Wilkinson 4096b736c8 Tolerate race condition in httpRequestsAreTimed
Tomcat 11 will [1] send a response as soon as Content-Length bytes has
been written. This initiates a race between the timer being registered
on the server side and the test receiving the response and looking for
the timer.

Rather than sleeping for a fix period of time, we now use Awaitility
to await the availability of the timer.

Closes gh-48049

[1] https://github.com/apache/tomcat/commit/69eff83577f7c00cbaaca9384ab4b1989f516797
2025-11-12 11:40:30 +00:00
Andy Wilkinson 58cdf71b52 Restrict Kotlin serialization when alternative is available
Previously, Kotlin Serialization would be used too aggressively then
an alternative JSON converter was available. This could lead to
unwanted results when a response should have been serialized using
Jackson, for example, rather than Kotlin Serialization.

This commit addresses this by only allowing Kotlin Serialization to
serialize types that are not annotated with @Serializable when no
alternative JSON converter is available.

Fixes gh-48070
2025-11-12 10:00:45 +00:00
Brian Clozel 2e52c3c35e Update Kotlin Serialization configuration in HttpMessageConverters
As of As of spring-projects/spring-framework#35733, Spring Framework has
a dedicated method for configuring a Kotlin Serialization converter
specifically.

This commit uses this method instead of configuring the Kotlin
Serialization JSON support as a custom converter. This also removes the
`@Order` on the Kotlin converter bean itself, as there is no need to
order it in the list of custom converters anymore.

Closes gh-47917
2025-11-12 09:48:55 +01:00
Andy Wilkinson 93a3511f8a Revert "Merge branch '3.5.x'"
This reverts commit 001f953cc9, reversing
changes made to 0ae86935ae.

See gh-48059
2025-11-11 16:38:33 +00:00
Andy Wilkinson 001f953cc9 Merge branch '3.5.x'
Closes gh-48059
2025-11-11 16:11:27 +00:00
Andy Wilkinson 0ae86935ae Merge branch '3.5.x'
Closes gh-48057
2025-11-11 15:29:33 +00:00
Andy Wilkinson 756a6408fe Merge branch '3.5.x'
Closes gh-48055
2025-11-11 14:25:35 +00:00
Andy Wilkinson bbfd9f892b Revert "Remove sleep that appears to no longer be needed"
This reverts commit 6e8481bfff.

See gh-48049
2025-11-11 10:22:08 +00:00
Stéphane Nicoll 8584f604e3 Rename maxAttempts to maxRetries
Closes gh-48023
2025-11-11 10:22:08 +00:00
Stéphane Nicoll 00f60da0de Start building against Spring Framework 7.0.0 snapshots
See gh-47825
2025-11-11 10:22:06 +00:00
Stéphane Nicoll bb9d3ecdfb Merge branch '3.5.x' 2025-11-10 15:52:23 +01:00
Andy Wilkinson 0e44f1de42 Merge branch '3.5.x' 2025-11-10 10:39:32 +00:00
Stéphane Nicoll 96457f4665 Merge branch '3.5.x'
Closes gh-47996
2025-11-09 12:16:47 +01:00
Andy Wilkinson 07b13a40b1 Use separate Jakarta Mail API and Angus Mail dependencies
Closes gh-47983
2025-11-07 14:34:10 +00:00