1
昨天 af4fe61c734779e366f13dd06592f5b7216c6e3d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.vincent.rsf.schedule.common.config;
 
import com.vincent.rsf.framework.common.SnowflakeIdWorker;
import com.vincent.rsf.schedule.common.domain.QueueTask;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
 
import java.util.concurrent.LinkedBlockingQueue;
 
/**
 * Created by vincent on 12/19/2023
 */
@Configuration
@ComponentScan(value = "com.vincent.rsf.schedule.common.config")
public class BeanConfig {
 
    @Bean
    public LinkedBlockingQueue<QueueTask> unlockTaskQueue() {
        return new LinkedBlockingQueue<>();
    }
 
    @Bean
    public SnowflakeIdWorker snowflakeIdWorker() {
        return new SnowflakeIdWorker();
    }
 
}