From 5a30f0ffe1d33998c08adec3563368ddabf1c46a Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 15 Jun 2020 09:39:40 +0800 Subject: [PATCH] refactor: use @Component instead of @Controller for schedulers --- .../komga/interfaces/scheduler/InitialUserController.kt | 4 ++-- .../interfaces/scheduler/PeriodicDatabaseBackupController.kt | 4 ++-- .../komga/interfaces/scheduler/PeriodicScannerController.kt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/InitialUserController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/InitialUserController.kt index 9856e29b..e34e8f99 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/InitialUserController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/InitialUserController.kt @@ -9,12 +9,12 @@ import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.context.annotation.Profile import org.springframework.context.event.EventListener -import org.springframework.stereotype.Controller +import org.springframework.stereotype.Component private val logger = KotlinLogging.logger {} @Profile("!(test | claim)") -@Controller +@Component class InitialUserController( private val userLifecycle: KomgaUserLifecycle, private val initialUsers: List diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/PeriodicDatabaseBackupController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/PeriodicDatabaseBackupController.kt index 151bfde9..39cdc9e2 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/PeriodicDatabaseBackupController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/PeriodicDatabaseBackupController.kt @@ -7,12 +7,12 @@ import org.springframework.boot.context.event.ApplicationReadyEvent import org.springframework.context.annotation.Profile import org.springframework.context.event.EventListener import org.springframework.scheduling.annotation.Scheduled -import org.springframework.stereotype.Controller +import org.springframework.stereotype.Component private val logger = KotlinLogging.logger {} @Profile("!test") -@Controller +@Component class PeriodicDatabaseBackupController( private val taskReceiver: TaskReceiver, private val komgaProperties: KomgaProperties diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/PeriodicScannerController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/PeriodicScannerController.kt index 55f4b061..9471db66 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/PeriodicScannerController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/PeriodicScannerController.kt @@ -6,12 +6,12 @@ import org.springframework.boot.context.event.ApplicationReadyEvent import org.springframework.context.annotation.Profile import org.springframework.context.event.EventListener import org.springframework.scheduling.annotation.Scheduled -import org.springframework.stereotype.Controller +import org.springframework.stereotype.Component private val logger = KotlinLogging.logger {} @Profile("!test") -@Controller +@Component class PeriodicScannerController( private val taskReceiver: TaskReceiver ) {