chore: クラスパスを修正

This commit is contained in:
usbharu 2024-03-05 12:04:04 +09:00
parent fbdec67606
commit 8c7133f233
3 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,5 @@
plugins {
application
kotlin("jvm")
id("com.google.devtools.ksp") version "1.9.22-1.0.17"
}
@ -16,7 +17,7 @@ repositories {
dependencies {
implementation("org.mongodb:mongodb-driver-kotlin-coroutine:5.0.0")
compileOnly(project(":broker"))
implementation(project(":broker"))
implementation(project(":common"))
implementation(platform("io.insert-koin:koin-bom:3.5.3"))
implementation(platform("io.insert-koin:koin-annotations-bom:1.3.1"))
@ -30,4 +31,8 @@ tasks.test {
}
kotlin {
jvmToolchain(17)
}
application {
mainClass = "dev.usbharu.owl.broker.MainKt"
}

View File

@ -25,7 +25,6 @@ dependencies {
implementation("org.mongodb:mongodb-driver-kotlin-coroutine:4.11.0")
implementation("org.mongodb:bson-kotlinx:4.11.0")
implementation(project(":common"))
runtimeOnly(project(":broker:broker-mongodb"))
implementation("org.apache.logging.log4j:log4j-slf4j2-impl:2.23.0")
implementation(platform("io.insert-koin:koin-bom:3.5.3"))
implementation(platform("io.insert-koin:koin-annotations-bom:1.3.1"))

View File

@ -35,7 +35,6 @@ fun main() {
Class.forName("dev.usbharu.owl.broker.mongodb.MongoModuleContext").newInstance() as ModuleContext
// println(File(Thread.currentThread().contextClassLoader.getResource("dev/usbharu/owl/broker/mongodb").file).listFiles().joinToString())
val koin = startKoin {
@ -44,7 +43,8 @@ fun main() {
val module = module {
single {
val clientSettings =
MongoClientSettings.builder().applyConnectionString(ConnectionString("mongodb://localhost:27017"))
MongoClientSettings.builder()
.applyConnectionString(ConnectionString("mongodb://agent1.build:27017"))
.uuidRepresentation(UuidRepresentation.STANDARD).build()
@ -57,7 +57,7 @@ fun main() {
DefaultRetryPolicyFactory(emptyMap())
}
}
modules(module,defaultModule, moduleContext.module())
modules(module, defaultModule, moduleContext.module())
}
val application = koin.koin.get<OwlBrokerApplication>()