使用KTOR构建时,如何将LogBack.xml和LogBack-test.xml分开?
使用KTOR构建REST-API时,如何分开LogBack.xml和LogBack-test.xml?使用Springboot,您可以轻松分开并设置配置文件。但是如何在KTOR中做到这一点?
感谢您的帮助。
How can I seperate logback.xml and logback-test.xml when building rest-api with Ktor? With SpringBoot you can seperate easily and set profile. But how to do it in Ktor?
Thanks for help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许为时已晚,但我遇到了同样的问题。我通过为每个环境定义不同的资源来解决这一问题。每个环境也可以具有不同的代码。 的一部分
这是我的 build.gradle.ktx
另外,环境参数可以传递给gradle运行,例如:
Maybe it's too late but I had the same problem. I solved that by defining different resources for each environment. You can also have different code per environment. Here is a part of my build.gradle.ktx
the default environment can be set in gradle.properties file
also the environment parameter can be passed to gradle run eg: