I am setting up Koin DI on Ktor in this way:
But I am getting an error: No value passed for parameter 'clazz'
My implementation looks like this:
import io.ktor.application.*
import io.ktor.routing.*
import org.koin.java.KoinJavaComponent.inject
import services.SomeService
fun Application.registerPropertyRoutes() {
routing {
bodySectionRoute() // add more routes for Property page here
}
}
fun Route.bodySectionRoute() {
val someService by inject<SomeService>()
get("/bodySection") {
// business logic can be connected here
}
}
Any ideas what I am missing?
Update: