【发布时间】:2019-05-22 07:17:52
【问题描述】:
我正在挖掘内置的配置支持,并且想使用它(而不是仅仅将我自己的与 Ktor 一起使用),但我很难弄清楚如何以一种干净的方式来做。我有这个,它正在工作,但它真的很难看,我觉得必须有更好的方法:
val myBatisConfig = MyBatisConfig(
environment.config.property("mybatis.url").getString(),
environment.config.property("mybatis.driver").getString(),
environment.config.property("mybatis.poolSize").getString().toInt())
installKoin(listOf(mybatisModule(myBatisConfig), appModule), logger = SLF4JLogger())
感谢您的帮助!
【问题讨论】: