package com.mosty.common.config;

import com.mosty.common.base.util.SpringIocContext;
import com.mosty.common.config.service.SysDictItemService;
import com.mosty.common.config.service.SysDictService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 *  单体服务或基础微服务 使用的服务工厂
 * @author kevin
 * @date 2022/2/9 10:57 PM
 * @since 1.0.0
 */
@Slf4j
@Component
@AllArgsConstructor
public class ConfigServiceFactory implements InitializingBean {

    public static SysDictService sysDictService;
    public static SysDictItemService sysDictItemService;

    @Override
    public void afterPropertiesSet() throws Exception {
//        ConfigServiceFactory.sysDictService = SpringIocContext.getBean(SysDictService.class);
//        log.info("需要调用字典服务使用：ConfigServiceFactory.sysDictService");
//        ConfigServiceFactory.sysDictItemService = SpringIocContext.getBean(SysDictItemService.class);
//        log.info("需要调用字典明细服务使用：ConfigServiceFactory.sysDictItemService");
    }

    

}
