saveourtool / app-cloud-template

App cloud template on Gradle and Spring Boot
MIT License
0 stars 0 forks source link

Set Kotlinx.serialization as serialiser #1

Closed orchestr7 closed 3 months ago

orchestr7 commented 3 months ago

Kotlin multiplatform serialization

Kotlin multiplatform serialization is supported in Spring MVC, Spring WebFlux and Spring Messaging (RSocket). The builtin support currently targets CBOR, JSON, and ProtoBuf formats. To enable it, follow those instructions to add the related dependency and plugin. With Spring MVC and WebFlux, both Kotlin serialization and Jackson will be configured by default if they are in the classpath since Kotlin serialization is designed to serialize only Kotlin classes annotated with @Serializable. With Spring Messaging (RSocket), make sure that neither Jackson, GSON or JSONB are in the classpath if you want automatic configuration, if Jackson is needed configure KotlinSerializationJsonMessageConverter manually.

nulls commented 3 months ago

Tested locally, Spring already uses kotlinx serialization by default.