Jacob Richards
09/16/2019, 8:38 PMvoben
09/17/2019, 12:05 AMJacob Richards
09/17/2019, 4:53 AMgildor
09/17/2019, 5:46 AMEduard Boloș
09/17/2019, 5:08 PMgildor
09/17/2019, 11:23 PMEduard Boloș
09/18/2019, 9:19 AMgildor
09/18/2019, 9:34 AMCody Engel
04/06/2020, 11:22 PMgildor
04/07/2020, 5:20 AMPacane
04/07/2020, 10:26 AMgildor
04/07/2020, 11:23 AMinterface RouterRegistrator {
fun Routing.registerRoutes()
}
//Which provided like:
@Binds @IntoSet fun myRoute(impl: MyRoute): RouterRegistrator
//Then inject it:
class MyApp @Inject constructor (val routes: Set<RouterRegistrator>) {
fun install(application: Application) {
application.install(Routing) {
routes.forEach { it.registerRoutes() }
}
}
Code is not checked, just a draft of this ideaPacane
04/07/2020, 12:55 PMCody Engel
04/07/2020, 2:29 PMgildor
04/07/2020, 3:08 PMCody Engel
04/07/2020, 3:47 PM