From 4c64f4f80d54e817256d624bcf5a92eb7375b856 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 26 Jul 2017 10:49:38 +0200 Subject: [PATCH] Add Jackson Kotlin module to JSON starter This commit adds the `jackson-module-kotlin` dependency to the JSON starter. As the other modules selected there, the goal is to provide additional Jackson support to Spring Boot projects. In this case, the Kotlin language is supported by many Spring projects and this module is essential for (de)serialization with Jackson. Note that the module has a transitive dependency on `kotlin-reflect`, but this dependency should be brought by the application itself. Spring Framework will configure the Kotlin Jackson module *only if* the Kotlin sdk is present. Closes gh-9803 --- spring-boot-starters/spring-boot-starter-json/pom.xml | 10 ++++++++++ .../src/main/resources/META-INF/spring.provides | 2 +- .../src/main/resources/META-INF/spring.provides | 2 +- .../src/main/resources/META-INF/spring.provides | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/spring-boot-starters/spring-boot-starter-json/pom.xml b/spring-boot-starters/spring-boot-starter-json/pom.xml index 33e9a94c8e..4dc4e74f66 100644 --- a/spring-boot-starters/spring-boot-starter-json/pom.xml +++ b/spring-boot-starters/spring-boot-starter-json/pom.xml @@ -34,5 +34,15 @@ com.fasterxml.jackson.module jackson-module-parameter-names + + com.fasterxml.jackson.module + jackson-module-kotlin + + + org.jetbrains.kotlin + kotlin-reflect + + + diff --git a/spring-boot-starters/spring-boot-starter-json/src/main/resources/META-INF/spring.provides b/spring-boot-starters/spring-boot-starter-json/src/main/resources/META-INF/spring.provides index 8698e3eea1..d9be699d69 100644 --- a/spring-boot-starters/spring-boot-starter-json/src/main/resources/META-INF/spring.provides +++ b/spring-boot-starters/spring-boot-starter-json/src/main/resources/META-INF/spring.provides @@ -1 +1 @@ -provides: jackson-databind,jackson-datatype-jdk8,jackson-datatype-jsr310,jackson-module-parameter-names \ No newline at end of file +provides: jackson-databind,jackson-datatype-jdk8,jackson-datatype-jsr310,jackson-module-parameter-names,jackson-module-kotlin \ No newline at end of file diff --git a/spring-boot-starters/spring-boot-starter-web/src/main/resources/META-INF/spring.provides b/spring-boot-starters/spring-boot-starter-web/src/main/resources/META-INF/spring.provides index e2bbb3c16e..d5f05dcffe 100644 --- a/spring-boot-starters/spring-boot-starter-web/src/main/resources/META-INF/spring.provides +++ b/spring-boot-starters/spring-boot-starter-web/src/main/resources/META-INF/spring.provides @@ -1 +1 @@ -provides: spring-webmvc,spring-web,jackson-databind \ No newline at end of file +provides: spring-webmvc,spring-web \ No newline at end of file diff --git a/spring-boot-starters/spring-boot-starter-webflux/src/main/resources/META-INF/spring.provides b/spring-boot-starters/spring-boot-starter-webflux/src/main/resources/META-INF/spring.provides index 2e3b26f34c..9c0d58c173 100644 --- a/spring-boot-starters/spring-boot-starter-webflux/src/main/resources/META-INF/spring.provides +++ b/spring-boot-starters/spring-boot-starter-webflux/src/main/resources/META-INF/spring.provides @@ -1 +1 @@ -provides: spring-webflux,jackson-databind \ No newline at end of file +provides: spring-webflux \ No newline at end of file