Skip to content

Commit

Permalink
move jackson module config to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
kozjan committed Aug 29, 2023
1 parent 493f921 commit c9f2b29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
}
Original file line number Diff line number Diff line change
@@ -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()
}

0 comments on commit c9f2b29

Please sign in to comment.