package com.qmth.boot.core.uid.config;

import com.qmth.boot.core.uid.service.UidMachineService;
import com.qmth.boot.core.uid.service.impl.LocalMachineService;
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.uid")
public class UidAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(UidMachineService.class)
    public UidMachineService uidMachineService() {
        return new LocalMachineService();
    }

}
