November 2018
Intermediate to advanced
388 pages
9h 5m
English
In Gradle, we add the following dependencies:
dependencies { compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version") compile("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" }
Enable the Kotlin module in the Application.kt file:
@ApplicationPath("home")class Application :MyApp(){ private val classes = setOf(PersonService: :class.java) private val singletons = setOf(ContextResolver()) override fun getClasses() = classes override fun getSingletons() = singletons}class ContextResolver :ContextResolver<ObjectMapper> { val objectMapper = ObjectMapper() init{ objectMapper.registerModule(KotlinModule()) } override fun getContext(p0:Class<*>?) = objectMapper }
The frameworks and their ...
Read now
Unlock full access