package com.gic.haoban.manage.web.utils;

import com.gic.commons.switcher.SwitcherApplication;
import com.gic.haoban.manage.web.utils.switcher.CustomSwitcher;
import com.gic.haoban.manage.web.utils.switcher.MarketingSwitcher;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import java.util.concurrent.atomic.AtomicBoolean;

@Component
public class SwitcherInitialization implements InitializingBean {
    static AtomicBoolean INIT = new AtomicBoolean(false);
    @Override
    public void afterPropertiesSet() throws Exception {
        SwitcherApplication.init(CustomSwitcher.class);
        SwitcherApplication.init(MarketingSwitcher.class);
    }
}