Skip to content

Possible autoconfigure bug with kotlinx serialization and webflux #51840

Description

@trondgzi

Using spring-boot-starter-kotlinx-serialization-json seems to work out of the box, but when customizing the Json instance using a KotlinxSerializationJsonBuilderCustomizer it seems like KotlinxSerializationJsonCodecConfiguration doesn't find a Json instance with its @ConditionalOnBean(Json.class). That again leads to the customization not being applied to the Json instance used for json serialization and serialization fails.

I have created a minimal project showing the problem here. In the sample project I've defined a bean matching what KotlinxSerializationJsonCodecConfiguration does, and if that bean is enabled the tests work as expected. The sample project is using Spring Boot 4.1.1 and the same behavior is found in 4.0.8 as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by anothertype: bugA general bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions