gonna reshare in case I missed something, but I am...
# koin
m
gonna reshare in case I missed something, but I am unable to find anything that would do this, meaning I have to register all DI "services" even if they only have
get()
?
c
You mean something like this?
createdAtStart
Boolean?
a
you mean avoid writing “get()” ?
m
ye, I mean avoid
get()
a
what do you mean by autoconfigure?
m
either for example have something like:
Copy code
single { StoreRepository() }
without writing
get()
for every argumetn, or ideally something like:
Copy code
App:
 resource: '../src/main/kotlin'
that would register everything in that package as a service, and then we would manually need to register things that couldn't be auto registered. just wondering if something like this exists
c
the
singleBy<StoreRepositoryImpl, StoreRepository>
was awesome, not sure why that didn't live on.
a
this last is using reflection
m
as in, using reflection when we declare configuration? the thing I am annoyed about is this:
Copy code
single { PurchaseService(get(), get(), get(), get()) }
single { AcceptPurchase(get(), get(), get()) }
single<PurchaseRepository> { ExposedPurchaseRepository(get()) }
I end up with loads
get()