diff --git a/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/consul/ConsulWatcherConfig.kt b/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/consul/ConsulWatcherConfig.kt index 251d448ca..d16e79f68 100644 --- a/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/consul/ConsulWatcherConfig.kt +++ b/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/consul/ConsulWatcherConfig.kt @@ -1,7 +1,6 @@ package pl.allegro.tech.servicemesh.envoycontrol.infrastructure.consul import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.kotlin.KotlinModule import okhttp3.Dispatcher import okhttp3.Interceptor import okhttp3.OkHttpClient @@ -106,7 +105,4 @@ open class ConsulWatcherConfig { private val counter = AtomicInteger() override fun newThread(r: Runnable) = Thread(r, "consul-watcher-worker-${counter.getAndIncrement()}") } - - @Bean - fun kotlinModule() = KotlinModule.Builder().build() } diff --git a/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/consul/JacksonConfig.kt b/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/consul/JacksonConfig.kt new file mode 100644 index 000000000..bdca62e9b --- /dev/null +++ b/envoy-control-runner/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/infrastructure/consul/JacksonConfig.kt @@ -0,0 +1,12 @@ +package pl.allegro.tech.servicemesh.envoycontrol.infrastructure.consul + +import com.fasterxml.jackson.module.kotlin.KotlinModule +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration + +@Configuration +open class JacksonConfig { + + @Bean + fun kotlinModule() = KotlinModule.Builder().build() +}