多态配置
package com.gisquest.realestate.micro.supervise.attachment.component;
import com.alibaba.fastjson.JSON;
import com.gisquest.realestate.micro.supervise.attachment.app.DigitalAttachmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
import java.util.Map;
/**
*
* @description 附图证照公共接口
* @date 2020/11/13
*/
@Component
@Slf4j
public class AttachmentBeanFactory implements ApplicationContextAware {
private static Map<String, DigitalAttachmentService> attachmentServiceBeanMap;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
log.info("服务工厂加载开始");
attachmentServiceBeanMap = applicationContext.getBeansOfType(DigitalAttac