taskScheduler에 Primary 설정
This commit is contained in:
parent
a1ef9a4970
commit
9039a7a2d0
|
@ -2,12 +2,14 @@ package kr.co.vividnext.sodalive.configs
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
|
import org.springframework.context.annotation.Primary
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling
|
import org.springframework.scheduling.annotation.EnableScheduling
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
class SchedulerConfig {
|
class SchedulerConfig {
|
||||||
|
@Primary
|
||||||
@Bean(name = ["taskScheduler"])
|
@Bean(name = ["taskScheduler"])
|
||||||
fun taskScheduler(): ThreadPoolTaskScheduler {
|
fun taskScheduler(): ThreadPoolTaskScheduler {
|
||||||
val scheduler = ThreadPoolTaskScheduler()
|
val scheduler = ThreadPoolTaskScheduler()
|
||||||
|
|
Loading…
Reference in New Issue