package com.yunfeiyun.agmp.common.framework.config;

import com.yunfeiyun.agmp.common.framework.incrementer.DefaultIdentifierGenerator;
import com.yunfeiyun.agmp.common.framework.incrementer.IdentifierGenerator;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

@Lazy
@Configuration(proxyBeanMethods = false)
public class IdentifierGeneratorAutoConfiguration {

    @Configuration(proxyBeanMethods = false)
    public static class WorkCenterAutoConfig {

        @Bean
        @ConditionalOnMissingBean
        public IdentifierGenerator identifierGenerator() {
            return new DefaultIdentifierGenerator(10,10);
        }

    }

}
