From 60c2dfa41a39bb207ec43635378ad5ca65f0a7d6 Mon Sep 17 00:00:00 2001 From: "Davin Byeon (Dan)" Date: Wed, 24 May 2023 00:04:54 +0900 Subject: [PATCH] use daemon thread (#7) --- truffle-core/src/main/kotlin/TruffleClient.kt | 5 ++++- truffle-spring-boot-starter/build.gradle.kts | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/truffle-core/src/main/kotlin/TruffleClient.kt b/truffle-core/src/main/kotlin/TruffleClient.kt index 56d2009..cbc5f22 100644 --- a/truffle-core/src/main/kotlin/TruffleClient.kt +++ b/truffle-core/src/main/kotlin/TruffleClient.kt @@ -28,7 +28,10 @@ internal class DefaultTruffleClient( init { val coroutineScope = CoroutineScope( - Executors.newSingleThreadExecutor { r -> Thread(r, "truffle-client") }.asCoroutineDispatcher() + Executors.newSingleThreadExecutor { + r -> + Thread(r, "truffle-client").apply { isDaemon = true } + }.asCoroutineDispatcher() ) val webClient = webClientBuilder .codecs { diff --git a/truffle-spring-boot-starter/build.gradle.kts b/truffle-spring-boot-starter/build.gradle.kts index 054dfb9..e9e51b0 100644 --- a/truffle-spring-boot-starter/build.gradle.kts +++ b/truffle-spring-boot-starter/build.gradle.kts @@ -1,3 +1,7 @@ +plugins { + kotlin("kapt") +} + apply { plugin("kotlin-allopen") plugin("kotlin-spring") @@ -7,6 +11,7 @@ dependencies { compileOnly("org.springframework.boot:spring-boot-starter-web") compileOnly("org.springframework.boot:spring-boot-starter-webflux") annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") + kapt("org.springframework.boot:spring-boot-configuration-processor") implementation(project(":truffle-core")) compileOnly(project(":truffle-logback"))