feat: 起動時に読み込んだモジュールの名前を表示するように

This commit is contained in:
usbharu 2024-03-06 15:11:10 +09:00
parent 9182b040fc
commit 43f9bfbc61
Signed by: usbharu
GPG Key ID: 8CB1087135660B8D
1 changed files with 9 additions and 1 deletions

View File

@ -22,10 +22,18 @@ import kotlinx.coroutines.runBlocking
import org.koin.core.context.startKoin
import org.koin.dsl.module
import org.koin.ksp.generated.defaultModule
import org.slf4j.LoggerFactory
import java.util.*
val logger = LoggerFactory.getLogger("MAIN")
fun main() {
val moduleContext = ServiceLoader.load(ModuleContext::class.java).first()
val moduleContexts = ServiceLoader.load(ModuleContext::class.java)
val moduleContext = moduleContexts.first()
logger.info("Use module name: {}", moduleContext)
val koin = startKoin {
printLogger()