Commit Graph

26 Commits

Author SHA1 Message Date
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
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
Stéphane Nicoll 00f60da0de Start building against Spring Framework 7.0.0 snapshots
See gh-47825
2025-11-11 10:22:06 +00:00
Andy Wilkinson bf8e0c45a8 Allow customizations of default customizers to be overridden
Previously, the default client and server HTTP message converter
customizers were ordered with lowest precedence. This made it
impossible to guarantee that another customizer would be able to go
after the default customizers, preventing their customizations from
being reliably overridden.

This commit updates the definitions of the default customizers to
order them at 0. This allows additional customizers to be ordered
either before or after them. Usage of the customizers is now always
ordered (previously Spring MVC's was not).

See gh-47798
2025-10-27 12:41:31 +00:00
Andy Wilkinson aa95282290 Polish `@since` tags
Closes gh-47779
2025-10-23 12:48:58 +01:00
Moritz Halbritter 0ffc4649a6 Polish 2025-10-22 16:43:50 +02:00
Moritz Halbritter 5862d70725 Polish description of 'spring.http.converters.preferred-json-mapper' 2025-10-22 16:43:12 +02:00
Stéphane Nicoll 1b1801adb1 Polish 2025-10-20 13:33:00 +02:00
Andy Wilkinson 7b60227f41 Consider Jackson 2 in HTTP message converter auto-config
See gh-47688
2025-10-17 13:17:13 -07:00
Andy Wilkinson 9eb05ebb10 Create spring-boot-resttestclient and spring-boot-webtestclient modules
Create `spring-boot-resttestclient` and `spring-boot-webtestclient`
modules to hold test client auto-configuration and `TestRestTemplate`
code.

Previous these classes were contained in `spring-boot-resetclient-test`
and `spring-boot-webclient-test` which was incorrect since the `-test`
modules should hold code need to test the given modules, not supporting
test classes.

See gh-46356

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2025-10-09 22:12:39 -07:00
Stéphane Nicoll 43b06ca9b9 Start building against Spring Data Bom 2025.1.0-RC1 snapshots
See gh-47394
2025-10-07 11:37:12 +02:00
Moritz Halbritter cae3fb578c Add nullability annotations to tests in module/spring-boot-http-converter
See gh-47263
2025-10-06 12:03:56 +02:00
Brian Clozel 92ee73df30 Deprecate HttpMessageConverters for Framework's
Prior to this commit, Spring Boot had an  `HttpMessageConverters` class
that allowed, to configure message converter instances for MVC server
applications and traditional Spring HTTP clients.

As of Spring Framework 7.0, Framework ships its own
`HttpMessageConverters` class, aligning with the existing codecs
configuration on the WebFlux side. As a result, a few methods taking
`List<HttpMessageConverter>` as arguments were deprecated in favor of
the new arrangement.

This commit adapts to the Framework changes by deprecating Boot's
`HttpMessageConverters` in favor of Framework's. This splits the client
and server configuration as they are meant to be managed separately.
Applications can still contribute `HttpMessageConverters` (Boot's
variant) beans but the type itself is now deprecated.
Instead, applications should now contribute
`ClientHttpMessageConvertersCustomizer` and
`ServerHttpMessageConvertersCustomizer` beans to customize message
converters.

Closes gh-46411
2025-10-02 15:22:13 +02:00
Phillip Webb 2cf854c5b6 Polish 2025-09-18 13:29:47 -07:00
Brian Clozel a6cf0365ce Revisit Kotlin Serialization integration
This commit removes the "kotlin-serialization" option from the
`spring.http.converters.preferred-json-mapper` and configures the kotlin
serialization http message converter ahead of the preferred JSON
converter.

This effectively makes Kotlin Serialization a converter that is
considered first for JSON support, and then Jackson/Jsonb/Gson is
considered as fallback.

Closes gh-47178
2025-09-12 18:05:23 +02:00
Brian Clozel 6a55d7b49b Polishing contribition
Closes gh-46546
2025-09-10 20:53:40 +02:00
Dmitry Sulman c7621bb6be Introduce Kotlin Serialization auto-configuration
See gh-46546

Signed-off-by: Dmitry Sulman <dmitry.sulman@gmail.com>
2025-09-10 20:53:40 +02:00
Andy Wilkinson 652401b76c Polish message converter references relating to Jackson 3 upgrade
See gh-45535
2025-09-10 15:23:22 +01:00
Andy Wilkinson d353038c58 Update Jackson support to require Jackson 3
Closes gh-45535
2025-09-02 11:37:09 +01:00
Moritz Halbritter 12cb825924 Add nullability annotations to module/spring-boot-http-converter
See gh-46587
2025-08-04 11:27:40 +02:00
Phillip Webb 067b4204b3 Start building against Spring Framework 7.0.0-M8 snapshots
See gh-46620
2025-07-31 09:36:58 +01:00
Moritz Halbritter c0f1f641ce Make auto-configurations final and remove public members
Closes gh-32883
2025-07-29 09:48:49 +02:00
Stéphane Nicoll 6b140ddbd6 Polish
See gh-46540
2025-07-25 14:28:32 +02:00
Phillip Webb decc32dde3 Restructure project directories to better fit Gradle
Closes gh-46358
2025-07-10 17:54:08 -07:00