Use a single config file
This commit is contained in:
@@ -16,10 +16,7 @@ import javax.sql.DataSource
|
||||
* [Kodein] controller module containing the app configuration
|
||||
*/
|
||||
val configurationModule = Kodein.Module(name = "Configuration") {
|
||||
bind() from singleton {
|
||||
val configFile by this.kodein.instance<String>(tag = "config file")
|
||||
ConfigLoader().loadConfigOrThrow<Config>(configFile)
|
||||
}
|
||||
bind() from singleton { ConfigLoader().loadConfigOrThrow<Config>("/application.yaml") }
|
||||
bind<SimpleJWT>(tag = "auth") with singleton { configureAuthJwt(this.kodein) }
|
||||
bind<SimpleJWT>(tag = "refresh") with singleton { configureRefreshJwt(this.kodein) }
|
||||
bind<DataSource>() with singleton { configureDatasource(this.kodein) }
|
||||
|
||||
Reference in New Issue
Block a user