mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 16:42:24 +01:00
refactor: use @Component instead of @Controller for schedulers
This commit is contained in:
parent
374f39d76c
commit
5a30f0ffe1
3 changed files with 6 additions and 6 deletions
|
|
@ -9,12 +9,12 @@ import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
import org.springframework.context.annotation.Profile
|
import org.springframework.context.annotation.Profile
|
||||||
import org.springframework.context.event.EventListener
|
import org.springframework.context.event.EventListener
|
||||||
import org.springframework.stereotype.Controller
|
import org.springframework.stereotype.Component
|
||||||
|
|
||||||
private val logger = KotlinLogging.logger {}
|
private val logger = KotlinLogging.logger {}
|
||||||
|
|
||||||
@Profile("!(test | claim)")
|
@Profile("!(test | claim)")
|
||||||
@Controller
|
@Component
|
||||||
class InitialUserController(
|
class InitialUserController(
|
||||||
private val userLifecycle: KomgaUserLifecycle,
|
private val userLifecycle: KomgaUserLifecycle,
|
||||||
private val initialUsers: List<KomgaUser>
|
private val initialUsers: List<KomgaUser>
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ import org.springframework.boot.context.event.ApplicationReadyEvent
|
||||||
import org.springframework.context.annotation.Profile
|
import org.springframework.context.annotation.Profile
|
||||||
import org.springframework.context.event.EventListener
|
import org.springframework.context.event.EventListener
|
||||||
import org.springframework.scheduling.annotation.Scheduled
|
import org.springframework.scheduling.annotation.Scheduled
|
||||||
import org.springframework.stereotype.Controller
|
import org.springframework.stereotype.Component
|
||||||
|
|
||||||
private val logger = KotlinLogging.logger {}
|
private val logger = KotlinLogging.logger {}
|
||||||
|
|
||||||
@Profile("!test")
|
@Profile("!test")
|
||||||
@Controller
|
@Component
|
||||||
class PeriodicDatabaseBackupController(
|
class PeriodicDatabaseBackupController(
|
||||||
private val taskReceiver: TaskReceiver,
|
private val taskReceiver: TaskReceiver,
|
||||||
private val komgaProperties: KomgaProperties
|
private val komgaProperties: KomgaProperties
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ import org.springframework.boot.context.event.ApplicationReadyEvent
|
||||||
import org.springframework.context.annotation.Profile
|
import org.springframework.context.annotation.Profile
|
||||||
import org.springframework.context.event.EventListener
|
import org.springframework.context.event.EventListener
|
||||||
import org.springframework.scheduling.annotation.Scheduled
|
import org.springframework.scheduling.annotation.Scheduled
|
||||||
import org.springframework.stereotype.Controller
|
import org.springframework.stereotype.Component
|
||||||
|
|
||||||
private val logger = KotlinLogging.logger {}
|
private val logger = KotlinLogging.logger {}
|
||||||
|
|
||||||
@Profile("!test")
|
@Profile("!test")
|
||||||
@Controller
|
@Component
|
||||||
class PeriodicScannerController(
|
class PeriodicScannerController(
|
||||||
private val taskReceiver: TaskReceiver
|
private val taskReceiver: TaskReceiver
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue