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 { plugins {
application
kotlin("jvm") kotlin("jvm")
id("com.google.devtools.ksp") version "1.9.22-1.0.17" id("com.google.devtools.ksp") version "1.9.22-1.0.17"
} }
@ -16,7 +17,7 @@ repositories {
dependencies { dependencies {
implementation("org.mongodb:mongodb-driver-kotlin-coroutine:5.0.0") implementation("org.mongodb:mongodb-driver-kotlin-coroutine:5.0.0")
compileOnly(project(":broker")) implementation(project(":broker"))
implementation(project(":common")) implementation(project(":common"))
implementation(platform("io.insert-koin:koin-bom:3.5.3")) implementation(platform("io.insert-koin:koin-bom:3.5.3"))
implementation(platform("io.insert-koin:koin-annotations-bom:1.3.1")) implementation(platform("io.insert-koin:koin-annotations-bom:1.3.1"))
@ -31,3 +32,7 @@ tasks.test {
kotlin { kotlin {
jvmToolchain(17) 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:mongodb-driver-kotlin-coroutine:4.11.0")
implementation("org.mongodb:bson-kotlinx:4.11.0") implementation("org.mongodb:bson-kotlinx:4.11.0")
implementation(project(":common")) implementation(project(":common"))
runtimeOnly(project(":broker:broker-mongodb"))
implementation("org.apache.logging.log4j:log4j-slf4j2-impl:2.23.0") 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-bom:3.5.3"))
implementation(platform("io.insert-koin:koin-annotations-bom:1.3.1")) 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 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()) // println(File(Thread.currentThread().contextClassLoader.getResource("dev/usbharu/owl/broker/mongodb").file).listFiles().joinToString())
val koin = startKoin { val koin = startKoin {
@ -44,7 +43,8 @@ fun main() {
val module = module { val module = module {
single { single {
val clientSettings = val clientSettings =
MongoClientSettings.builder().applyConnectionString(ConnectionString("mongodb://localhost:27017")) MongoClientSettings.builder()
.applyConnectionString(ConnectionString("mongodb://agent1.build:27017"))
.uuidRepresentation(UuidRepresentation.STANDARD).build() .uuidRepresentation(UuidRepresentation.STANDARD).build()