package com.qmth.boot.core.concurrent.configuration;

import com.qmth.boot.core.concurrent.service.ConcurrentService;
import com.qmth.boot.core.concurrent.service.impl.MemoryConcurrentService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.qmth.boot.core.concurrent")
public class ConcurrentAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(ConcurrentService.class)
    public ConcurrentService concurrentService() {
        return new MemoryConcurrentService();
    }

}
