summaryrefslogtreecommitdiff
path: root/sw-server/src
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2021-02-08 20:56:34 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2021-02-08 20:56:34 +0100
commit8ccccfe4e44ff69b3a68a40406a472cd3567838c (patch)
tree8062cdd0951be6d4aa7d5bc7f3063dafb6d2f4b2 /sw-server/src
parentRevert "Add Kotlinx Serialization converter for HTTP traffic" (diff)
downloadseven-wonders-8ccccfe4e44ff69b3a68a40406a472cd3567838c.tar.gz
seven-wonders-8ccccfe4e44ff69b3a68a40406a472cd3567838c.tar.bz2
seven-wonders-8ccccfe4e44ff69b3a68a40406a472cd3567838c.zip
Add Kotlinx Serialization converter for HTTP traffic (correctly)
Resolves: https://github.com/joffrey-bion/seven-wonders/issues/87
Diffstat (limited to 'sw-server/src')
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/SevenWonders.kt11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/SevenWonders.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/SevenWonders.kt
index 8496fafd..2485a28f 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/SevenWonders.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/SevenWonders.kt
@@ -1,10 +1,19 @@
package org.luxons.sevenwonders.server
import org.springframework.boot.autoconfigure.SpringBootApplication
+import org.springframework.boot.autoconfigure.http.HttpMessageConverters
import org.springframework.boot.runApplication
+import org.springframework.context.annotation.Bean
+import org.springframework.http.converter.json.KotlinSerializationJsonHttpMessageConverter
@SpringBootApplication
-class SevenWonders
+class SevenWonders {
+
+ @Bean
+ fun additionalConverters(): HttpMessageConverters? {
+ return HttpMessageConverters(KotlinSerializationJsonHttpMessageConverter())
+ }
+}
fun main(args: Array<String>) {
runApplication<SevenWonders>(*args)
bgstack15