Linked Questions

Popular Questions

How do I use custom configuration in Ktor?

Asked by At

I'm digging the built-in configuration support, and want to use it (instead of just rolling my own alongside Ktor's), but I'm having a hard time figuring out how to do it in a clean way. I've got this, and it's working, but it's really ugly and I feel like there has to be a better way:

val myBatisConfig = MyBatisConfig("mybatis.url").getString(),"mybatis.driver").getString(),"mybatis.poolSize").getString().toInt())

installKoin(listOf(mybatisModule(myBatisConfig), appModule), logger = SLF4JLogger())

Thanks for any help!

Related Questions