find if there’s a way NOT having to write a constructor for a regular class yourself. In DI libraries i worked with before you only have to explicitely write an implementaion of an interface. But with koin if i don’t specify class constructor i get org.koin.core.error.NoBeanDefFoundException: No definition found for class
this error threw because you didn't declared madule.You can inject classes with theses keywords Without constructor varable val myModule : Module = module { single { a() } } val a:a=by inject()
that was my question exactly is there a way NOT having to do that. Because with all the other DI frameworks you don’t need to write it for classes. You need to write it only for interfaces
Обсуждают сегодня