<address id="nhfpd"></address>

                <sub id="nhfpd"></sub>

                  spering getBean()

                  IOC:前面都是对bean定义的处理,postProcess已经实例化了。
                  解析bean的时候,把需要依赖注入的字段和方法,在postProcessMergedBeanDefinition方法中加到AutowiredAnnotationBeanPostProcessor的变量中,然后在AutowiredAnnotationBeanPostProcessor的作为入口,去依赖注入字段和方法。
                  
                  protected void finishBeanFactoryInitialization(ConfigurableListableBeanFactory beanFactory) {
                          if (beanFactory.containsBean(CONVERSION_SERVICE_BEAN_NAME) && beanFactory.isTypeMatch(CONVERSION_SERVICE_BEAN_NAME, ConversionService.class)) {
                              beanFactory.setConversionService(beanFactory.getBean(CONVERSION_SERVICE_BEAN_NAME, ConversionService.class));  // 实例化一个转换器ConversionService
                          }
                          String[] weaverAwareNames = beanFactory.getBeanNamesForType(LoadTimeWeaverAware.class, false, false);
                          for (String weaverAwareName : weaverAwareNames) {
                              getBean(weaverAwareName);   //  没用,
                          }
                          beanFactory.preInstantiateSingletons();  //IOC
                      }
                      
                  public void preInstantiateSingletons() throws BeansException {
                          List<String> beanNames;
                          synchronized (this.beanDefinitionMap) {   //所有的beanDefinition,也就是bean的定义信息
                              beanNames = new ArrayList<String>(this.beanDefinitionNames);  //所有的bean的名字
                          }
                          for (String beanName : beanNames) {//实例化所有的bean
                              RootBeanDefinition bd = getMergedLocalBeanDefinition(beanName);  // 合并功能,父子合并了的。
                              if (!bd.isAbstract() && bd.isSingleton() && !bd.isLazyInit()) {  //不是抽象的,不是懒加载的,是单利,才会去实例化。
                                  if (isFactoryBean(beanName)) {//实现了FactoryBean接口
                                      final FactoryBean<?> factory = (FactoryBean<?>) getBean(FACTORY_BEAN_PREFIX + beanName);
                                      boolean isEagerInit;
                                      if (System.getSecurityManager() != null && factory instanceof SmartFactoryBean) {//实现了SmartFactoryBean接口
                                          isEagerInit = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
                                              @Override
                                              public Boolean run() {
                                                  return ((SmartFactoryBean<?>) factory).isEagerInit();  //调用这个bean的isEagerInit方法,返回true就实例化,
                                              }
                                          }, getAccessControlContext());
                                      }
                                      else {
                                          isEagerInit = (factory instanceof SmartFactoryBean &&
                                                  ((SmartFactoryBean<?>) factory).isEagerInit()); //调用这个bean的isEagerInit方法,返回true就实例化,
                                      }
                                      if (isEagerInit) {//返回true就实例化,
                                          getBean(beanName); //实例化
                                      }
                                  }
                                  else {//没有实现了FactoryBean接口,
                                      getBean(beanName);
                                  }
                              }
                          }
                      }
                      
                  解析有父类的bean,就是合并子类和父类的信息,涉及到子类覆盖父类。 protected RootBeanDefinition getMergedLocalBeanDefinition(String beanName) throws BeansException {
                          RootBeanDefinition mbd = this.mergedBeanDefinitions.get(beanName);  // 先从缓存中拿
                          if (mbd != null) {
                              return mbd;
                          }
                          return getMergedBeanDefinition(beanName, getBeanDefinition(beanName));
                      }
                  
                      <bean id="parent" class="com.zhuguang.jack.testbean.Parent" abstract="true">
                      </bean>
                      <bean id="son" class="com.zhuguang.jack.testbean.Son" parent="parent">
                      </bean>    父类是用来继承的公共部分,不会被实例化。
                  
                  protected RootBeanDefinition getMergedBeanDefinition(String beanName, BeanDefinition bd, BeanDefinition containingBd)throws BeanDefinitionStoreException {//beanName是bean的名字,bd是bean的定义
                  
                          synchronized (this.mergedBeanDefinitions) {  //mergedBeanDefinitions 是缓存,
                              RootBeanDefinition mbd = null;
                              if (containingBd == null) {
                                  mbd = this.mergedBeanDefinitions.get(beanName);
                              }
                              if (mbd == null) {
                                  if (bd.getParentName() == null) { //  bean没有父类,直接初始化一个RootBeanDefinition
                                      if (bd instanceof RootBeanDefinition) {
                                          mbd = ((RootBeanDefinition) bd).cloneBeanDefinition();  //也是调用 new RootBeanDefinition(bd);
                                      }
                                      else {
                                          mbd = new RootBeanDefinition(bd);//bd是bean的定义信息,mbd是子类,bd是父类,这里做一个拷贝,是为了不污染db,而是使用重新初始化的mbd。
                                      }
                                  }
                                  else {
                                       //  bean有父类,要加载父类的信息
                                      BeanDefinition pbd;
                                      try {
                                          String parentBeanName = transformedBeanName(bd.getParentName());  //获取父亲的名字,
                                          if (!beanName.equals(parentBeanName)) {  //跟父的名字不一样,
                                              pbd = getMergedBeanDefinition(parentBeanName);  //父类的bean定义,父类在有父类继续调用。
                                          }
                                      }
                                      mbd = new RootBeanDefinition(pbd);   //pbd是父类,构造父类
                                      mbd.overrideFrom(bd);//bd是bean的定义信息,mbd是父类,bd是子类,子类覆盖父类的信息,
                                  }
                  
                                  if (containingBd == null && isCacheBeanMetadata() && isBeanEligibleForMetadataCaching(beanName)) {
                                      this.mergedBeanDefinitions.put(beanName, mbd);  //加到缓存
                                  }
                              }
                              return mbd;
                          }
                      }
                      
                  getBean(beanName);
                  
                  protected <T> T doGetBean(final String name, final Class<T> requiredType, final Object[] args, boolean typeCheckOnly)throws BeansException {
                  
                          final String beanName = transformedBeanName(name);
                          Object bean;
                  
                          //单利缓存中获取
                          Object sharedInstance = getSingleton(beanName);
                          if (sharedInstance != null && args == null) {
                              bean = getObjectForBeanInstance(sharedInstance, name, beanName, null);
                          }
                  
                          else {
                              if (isPrototypeCurrentlyInCreation(beanName)) {//已经创建了
                                  throw new BeanCurrentlyInCreationException(beanName);
                              }
                  
                              BeanFactory parentBeanFactory = getParentBeanFactory();//父类容器,从父类容器获取bean。
                              if (parentBeanFactory != null && !containsBeanDefinition(beanName)) {
                                  String nameToLookup = originalBeanName(name);
                                  if (args != null) {
                                      return (T) parentBeanFactory.getBean(nameToLookup, args);;//父类容器,从父类容器获取bean。
                                  }
                                  else {
                                      return parentBeanFactory.getBean(nameToLookup, requiredType);;//父类容器,从父类容器获取bean。
                                  }
                              }
                              try {
                                  final RootBeanDefinition mbd = getMergedLocalBeanDefinition(beanName);//父子合并
                  
                                  String[] dependsOn = mbd.getDependsOn();//依赖的bean,创建这个bean的时候先要创建哪些bean,
                                  if (dependsOn != null) {
                                      for (String dependsOnBean : dependsOn) {
                                          if (isDependent(beanName, dependsOnBean)) {//没有依赖关系
                                              throw new BeanCreationException("Circular depends-on relationship between ‘" +
                                                      beanName + "‘ and ‘" + dependsOnBean + "");
                                          }
                                          registerDependentBean(dependsOnBean, beanName);//增加依赖关系,
                                          getBean(dependsOnBean);//先实例化依赖的bean
                                      }
                                  }
                  
                                  if (mbd.isSingleton()) {//单利
                                      sharedInstance = getSingleton(beanName, new ObjectFactory<Object>() {
                                          @Override
                                          public Object getObject() throws BeansException {
                                              try {
                                                  return createBean(beanName, mbd, args);
                                              }
                                          }
                                      });
                                      bean = getObjectForBeanInstance(sharedInstance, name, beanName, mbd);
                                  }
                  
                                  else if (mbd.isPrototype()) {//多利
                                      // It‘s a prototype -> create a new instance.
                                      Object prototypeInstance = null;
                                      try {
                                          beforePrototypeCreation(beanName);
                                          prototypeInstance = createBean(beanName, mbd, args);
                                      }
                                      finally {
                                          afterPrototypeCreation(beanName);
                                      }
                                      bean = getObjectForBeanInstance(prototypeInstance, name, beanName, mbd);
                                  }
                  
                                  else {
                                      String scopeName = mbd.getScope();
                                      final Scope scope = this.scopes.get(scopeName);
                                      if (scope == null) {
                                          throw new IllegalStateException("No Scope registered for scope ‘" + scopeName + "");
                                      }
                                      try {
                                          Object scopedInstance = scope.get(beanName, new ObjectFactory<Object>() {
                                              @Override
                                              public Object getObject() throws BeansException {
                                                  beforePrototypeCreation(beanName);
                                                  try {
                                                      return createBean(beanName, mbd, args);
                                                  }
                                                  finally {
                                                      afterPrototypeCreation(beanName);
                                                  }
                                              }
                                          });
                                          bean = getObjectForBeanInstance(scopedInstance, name, beanName, mbd);
                                      }
                                  }
                              }
                          }
                  
                          if (requiredType != null && bean != null && !requiredType.isAssignableFrom(bean.getClass())) {
                              try {
                                  return getTypeConverter().convertIfNecessary(bean, requiredType);
                              }
                          }
                          return (T) bean;
                      }
                      
                  单利:
                  sharedInstance = getSingleton(beanName, new ObjectFactory<Object>() {
                      @Override
                      public Object getObject() throws BeansException {
                          try {
                              return createBean(beanName, mbd, args);
                          }
                      }
                  });
                  
                  public Object getSingleton(String beanName, ObjectFactory<?> singletonFactory) {
                          synchronized (this.singletonObjects) {//缓存
                              Object singletonObject = this.singletonObjects.get(beanName);
                              if (singletonObject == null) {
                                  try {
                                      singletonObject = singletonFactory.getObject();  //createBean
                                  }
                                  addSingleton(beanName, singletonObject);//缓存
                              }
                              return (singletonObject != NULL_OBJECT ? singletonObject : null);
                          }
                      }
                  
                  protected Object createBean(final String beanName, final RootBeanDefinition mbd, final Object[] args)throws BeanCreationException {
                          resolveBeanClass(mbd, beanName);   //bean的定义,bean的名字,拿出beanClass,
                          try {
                              mbd.prepareMethodOverrides();
                          }
                          try {
                              Object bean = resolveBeforeInstantiation(beanName, mbd);//BeanPostProcessors已经实例化了,实例化之前插一脚,直接返回这个实例化的bean。后面不用走了。可以自己去实例化这个bean,spring就不会管这个bean的实例化了。下面有梨子InstantiationAwareBeanPostProcessorTest,
                              if (bean != null) {
                                  return bean;
                              }
                          }
                    //前面resolveBeforeInstantiation没有成功实例化出这个bean。spring来实例化这个bean。
                          Object beanInstance = doCreateBean(beanName, mbd, args);
                          return beanInstance;
                      }
                  
                  protected Object resolveBeforeInstantiation(String beanName, RootBeanDefinition mbd) {
                          Object bean = null;
                          if (!Boolean.FALSE.equals(mbd.beforeInstantiationResolved)) {
                              if (mbd.hasBeanClass() && !mbd.isSynthetic() && hasInstantiationAwareBeanPostProcessors()) {
                                  bean = applyBeanPostProcessorsBeforeInstantiation(mbd.getBeanClass(), beanName);
                                  if (bean != null) {
                                      bean = applyBeanPostProcessorsAfterInitialization(bean, beanName);  //先执行before在执行after方法,
                                  }
                              }
                              mbd.beforeInstantiationResolved = (bean != null);
                          }
                          return bean;
                      }
                  
                  protected Object applyBeanPostProcessorsBeforeInstantiation(Class<?> beanClass, String beanName)throws BeansException {
                          for (BeanPostProcessor bp : getBeanPostProcessors()) {  //取出所有的BeanPostProcessors,
                              if (bp instanceof InstantiationAwareBeanPostProcessor) {  // 实现InstantiationAwareBeanPostProcessor接口的自己写的类,可以自己去实例化这个bean,spring就不会管这个bean的实例化了。下面有梨子InstantiationAwareBeanPostProcessorTest,
                                  InstantiationAwareBeanPostProcessor ibp = (InstantiationAwareBeanPostProcessor) bp;
                                  Object result = ibp.postProcessBeforeInstantiation(beanClass, beanName);  //通过所有的BeanPostProcessors来返回这个实例化的bean。spring就不会管这个bean的实例化了。
                                  if (result != null) {
                                      return result;
                                  }
                              }
                          }
                          return null;
                      }
                      
                  public class InstantiationAwareBeanPostProcessorTest implements InstantiationAwareBeanPostProcessor {
                      @Override
                      public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException {
                          try {
                              return beanClass.newInstance();
                          } catch (InstantiationException e) {
                              e.printStackTrace();
                          } catch (IllegalAccessException e) {
                              e.printStackTrace();
                          }
                          return null;
                      }
                      
                  protected Object doCreateBean(final String beanName, final RootBeanDefinition mbd, final Object[] args) {
                          BeanWrapper instanceWrapper = null;
                          if (mbd.isSingleton()) {
                              instanceWrapper = this.factoryBeanInstanceCache.remove(beanName);//缓存,
                          }
                          if (instanceWrapper == null) {
                              instanceWrapper = createBeanInstance(beanName, mbd, args);  // 包装类,通过反射实例创建完成。但是实例的属性还没有操作。不包括IOC的依赖注入。属性是没有值的。
                          }
                          final Object bean = (instanceWrapper != null ? instanceWrapper.getWrappedInstance() : null);
                          Class<?> beanType = (instanceWrapper != null ? instanceWrapper.getWrappedClass() : null);
                  
                          synchronized (mbd.postProcessingLock) {
                              if (!mbd.postProcessed) {
                                  applyMergedBeanDefinitionPostProcessors(mbd, beanType, beanName);   //下面解析, 
                  //解析完这个类需要依赖注入的字段和方法之后,在AutowiredAnnotationBeanPostProcessor增加一行记录factoryBeanTest=[FactoryBeanTest.woman(依赖注入字段), FactoryBeanTest.setWoman(com.zhuguang.jack.testbean.Woman)(依赖注入方法)]。 } mbd.postProcessed = true; } } boolean earlySingletonExposure = (mbd.isSingleton() && this.allowCircularReferences && isSingletonCurrentlyInCreation(beanName)); // 是单利并且允许循环依赖, if (earlySingletonExposure) { addSingletonFactory(beanName, new ObjectFactory<Object>() {//把ObjectFactory这个匿名对象加入到spring的三级缓存,在getSingleton从缓存取的时候,会调用三级缓存中的匿名对象ObjectFactory的getObject() 。 @Override public Object getObject() throws BeansException { return getEarlyBeanReference(beanName, mbd, bean); } }); } Object exposedObject = bean; try { populateBean(beanName, mbd, instanceWrapper); //IOC,依赖注入8中类型, if (exposedObject != null) { exposedObject = initializeBean(beanName, exposedObject, mbd); } } if (earlySingletonExposure) { Object earlySingletonReference = getSingleton(beanName, false); if (earlySingletonReference != null) { if (exposedObject == bean) { exposedObject = earlySingletonReference; } else if (!this.allowRawInjectionDespiteWrapping && hasDependentBean(beanName)) { String[] dependentBeans = getDependentBeans(beanName); Set<String> actualDependentBeans = new LinkedHashSet<String>(dependentBeans.length); for (String dependentBean : dependentBeans) { if (!removeSingletonIfCreatedForTypeCheckOnly(dependentBean)) { actualDependentBeans.add(dependentBean); } } if (!actualDependentBeans.isEmpty()) { throw new BeanCurrentlyInCreationException(beanName,"); } } } } try { registerDisposableBeanIfNecessary(beanName, bean, mbd); //注册, } return exposedObject; } protected BeanWrapper createBeanInstance(String beanName, RootBeanDefinition mbd, Object[] args) { Class<?> beanClass = resolveBeanClass(mbd, beanName);//拿到bean的class,class com.zhuguang.jack.testbean.A, if (mbd.getFactoryMethodName() != null) { return instantiateUsingFactoryMethod(beanName, mbd, args); //自己写的类去初始化,不要spring实例化, } return instantiateBean(beanName, mbd); } protected BeanWrapper instantiateBean(final String beanName, final RootBeanDefinition mbd) { try { Object beanInstance; final BeanFactory parent = this; if (System.getSecurityManager() != null) { //代码执行权限, beanInstance = AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { return getInstantiationStrategy().instantiate(mbd, beanName, parent); } }, getAccessControlContext()); } else { beanInstance = getInstantiationStrategy().instantiate(mbd, beanName, parent); //通过反射,[email protected]实例创建完成。 } BeanWrapper bw = new BeanWrapperImpl(beanInstance); //包装, initBeanWrapper(bw); return bw; } } public Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner) { if (beanDefinition.getMethodOverrides().isEmpty()) { synchronized (beanDefinition.constructorArgumentLock) { constructorToUse = (Constructor<?>) beanDefinition.resolvedConstructorOrFactoryMethod; if (constructorToUse == null) { final Class<?> clazz = beanDefinition.getBeanClass(); //拿到需要实例化的类, try { if (System.getSecurityManager() != null) { constructorToUse = AccessController.doPrivileged(new PrivilegedExceptionAction<Constructor<?>>() { @Override public Constructor<?> run() throws Exception { return clazz.getDeclaredConstructor((Class[]) null); //拿到构造器,无参构造器,为了防止循环依赖问题。 } }); } } } } return BeanUtils.instantiateClass(constructorToUse);//反射,实例化bean, } else { return instantiateWithMethodInjection(beanDefinition, beanName, owner);//Cglib } } protected void applyMergedBeanDefinitionPostProcessors(RootBeanDefinition mbd, Class<?> beanType, String beanName)throws BeansException { try { for (BeanPostProcessor bp : getBeanPostProcessors()) { if (bp instanceof MergedBeanDefinitionPostProcessor) {//实现这个接口的bean,才能做处理, MergedBeanDefinitionPostProcessor bdp = (MergedBeanDefinitionPostProcessor) bp; // 有一个AutowiredAnnotationBeanPostProcessor bdp.postProcessMergedBeanDefinition(mbd, beanType, beanName); } } } } AutowiredAnnotationBeanPostProcessor类的:依赖注入可以通过配置文件,也可以通过注解@Autowired,@Autowired,可以加载属性上面,也可以加载set方法上面。 public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) { if (beanType != null) { InjectionMetadata metadata = findAutowiringMetadata(beanName, beanType); //返回这个类,需要注解依赖注入的属性和方法, metadata.checkConfigMembers(beanDefinition); } } private InjectionMetadata findAutowiringMetadata(String beanName, Class<?> clazz) { String cacheKey = (StringUtils.hasLength(beanName) ? beanName : clazz.getName()); InjectionMetadata metadata = this.injectionMetadataCache.get(cacheKey); //AutowiredAnnotationBeanPostProcessor的缓存, if (InjectionMetadata.needsRefresh(metadata, clazz)) { synchronized (this.injectionMetadataCache) { metadata = this.injectionMetadataCache.get(cacheKey); if (InjectionMetadata.needsRefresh(metadata, clazz)) { metadata = buildAutowiringMetadata(clazz); //返回这个类,需要注解依赖注入的属性和方法, this.injectionMetadataCache.put(cacheKey, metadata); //解析完这个类需要依赖注入的字段和方法之后,在AutowiredAnnotationBeanPostProcessor增加一行记录factoryBeanTest = [ FactoryBeanTest.woman, FactoryBeanTest.setWoman(com.zhuguang.jack.testbean.Woman)],this=AutowiredAnnotationBeanPostProcessor } } } return metadata; } private InjectionMetadata buildAutowiringMetadata(Class<?> clazz) { LinkedList<InjectionMetadata.InjectedElement> elements = new LinkedList<InjectionMetadata.InjectedElement>(); Class<?> targetClass = clazz; do { LinkedList<InjectionMetadata.InjectedElement> currElements = new LinkedList<InjectionMetadata.InjectedElement>(); //InjectedElement是反射的属性或者方法对象, //@Autowired加载属性上面, for (Field field : targetClass.getDeclaredFields()) { // 拿到类的所有属性, AnnotationAttributes annotation = findAutowiredAnnotation(field); //获取字段的Autowired,Value,Inject 3种注解,其余注解不管,返回映射关系, if (annotation != null) { if (Modifier.isStatic(field.getModifiers())) { continue; } boolean required = determineRequiredStatus(annotation);//拿到注解的值, currElements.add(new AutowiredFieldElement(field, required)); //一个字段field对应一个AutowiredFieldElement,装到容器中。还没有涉及到IOC过程。 } } //@Autowired加载set方法上面, for (Method method : targetClass.getDeclaredMethods()) { // 拿到类的所有方法,有注解的方法是 FactoryBeanTest.setWoman(com.zhuguang.jack.testbean.Woman)。 @Autowired public void setWoman(Woman woman) { this.woman = woman; }, Method bridgedMethod = BridgeMethodResolver.findBridgedMethod(method); //方法的重载 AnnotationAttributes annotation = BridgeMethodResolver.isVisibilityBridgeMethodPair(method, bridgedMethod) ? findAutowiredAnnotation(bridgedMethod) : findAutowiredAnnotation(method); //找到这个方法上面有没有Autowired,Value,Inject 3种注解,其余注解不管, if (annotation != null && method.equals(ClassUtils.getMostSpecificMethod(method, clazz))) { if (Modifier.isStatic(method.getModifiers())) { continue; } boolean required = determineRequiredStatus(annotation);//拿到注解的值, PropertyDescriptor pd = BeanUtils.findPropertyForMethod(method);//拿到方法的类型对象PropertyDescriptor currElements.add(new AutowiredMethodElement(method, required, pd));//把method, required, pd包装成AutowiredMethodElement放到容器currElements中去, } } elements.addAll(0, currElements); targetClass = targetClass.getSuperclass(); } while (targetClass != null && targetClass != Object.class); //父类,也去解析父类, return new InjectionMetadata(clazz, elements); //返回这个类,需要注解依赖注入的属性和方法, } public AutowiredAnnotationBeanPostProcessor() { //AutowiredAnnotationBeanPostProcessor里面加了Autowired,Value,Inject 3种注解, this.autowiredAnnotationTypes.add(Autowired.class); this.autowiredAnnotationTypes.add(Value.class); ClassLoader cl = AutowiredAnnotationBeanPostProcessor.class.getClassLoader(); this.autowiredAnnotationTypes.add((Class<? extends Annotation>) cl.loadClass("javax.inject.Inject")); } singletonObjects是一级缓存,一个bean依赖注入完成之后,属性都完成了,才会存在在singletonObjects这个Map里面。 earlySingletonObjects是二级缓存,一个bean还没有完全实例化,有可能里面还有一些属性,还没有完全依赖注入完。 singletonFactories是三级缓存,里面存的是ObjectFactory对象。 二级三级缓存,就是为了解决循环依赖问题,A里面有B,B里面有A。A实例化的时候B没有实例化,此时A还是一个空壳子,会加到三级缓存,然后getBean(B),B实例化的时候发现有属性A,会去实例化getBean(A),此时A在三级缓存中,会调用这个三级缓存的getObject()方法。 protected Object getSingleton(String beanName, boolean allowEarlyReference) { Object singletonObject = this.singletonObjects.get(beanName);//从第一级取 if (singletonObject == null && isSingletonCurrentlyInCreation(beanName)) { synchronized (this.singletonObjects) { singletonObject = this.earlySingletonObjects.get(beanName);//从第二级取 if (singletonObject == null && allowEarlyReference) { ObjectFactory<?> singletonFactory = this.singletonFactories.get(beanName);//从第三级取 if (singletonFactory != null) { singletonObject = singletonFactory.getObject(); //三级缓存调用getObject(), this.earlySingletonObjects.put(beanName, singletonObject);//移到二级缓存, this.singletonFactories.remove(beanName);//从三级缓存删除, } } } } return (singletonObject != NULL_OBJECT ? singletonObject : null); } protected void addSingletonFactory(String beanName, ObjectFactory<?> singletonFactory) { synchronized (this.singletonObjects) { if (!this.singletonObjects.containsKey(beanName)) {//一级缓存没有 this.singletonFactories.put(beanName, singletonFactory);//放入三级缓存,准备上面的,调用三级缓存的getObject(), this.earlySingletonObjects.remove(beanName);//二级缓存移除 this.registeredSingletons.add(beanName); } } } protected Object getEarlyBeanReference(String beanName, RootBeanDefinition mbd, Object bean) { Object exposedObject = bean; if (bean != null && !mbd.isSynthetic() && hasInstantiationAwareBeanPostProcessors()) { for (BeanPostProcessor bp : getBeanPostProcessors()) { if (bp instanceof SmartInstantiationAwareBeanPostProcessor) { //这个接口, SmartInstantiationAwareBeanPostProcessor ibp = (SmartInstantiationAwareBeanPostProcessor) bp; exposedObject = ibp.getEarlyBeanReference(exposedObject, beanName); if (exposedObject == null) { return exposedObject; } } } } return exposedObject; } protected void populateBean(String beanName, RootBeanDefinition mbd, BeanWrapper bw) { PropertyValues pvs = mbd.getPropertyValues(); //拿到factoryBeanTest的需要依赖注入的属性,PropertyValues: length=1; bean property ‘woman‘ boolean continueWithPropertyPopulation = true; //当前bean的依赖注入到底要不要做, if (!mbd.isSynthetic() && hasInstantiationAwareBeanPostProcessors()) { for (BeanPostProcessor bp : getBeanPostProcessors()) { if (bp instanceof InstantiationAwareBeanPostProcessor) { // InstantiationAwareBeanPostProcessor ibp = (InstantiationAwareBeanPostProcessor) bp; if (!ibp.postProcessAfterInstantiation(bw.getWrappedInstance(), beanName)) { //返回布尔值,当前bean的依赖注入要不要做, continueWithPropertyPopulation = false; break; } } } } if (!continueWithPropertyPopulation) { //为false,当前bean的依赖注入就不用做了, return; } boolean hasInstAwareBpps = hasInstantiationAwareBeanPostProcessors(); //有没有实现InstantiationAwareBeanPostProcessor接口, boolean needsDepCheck = (mbd.getDependencyCheck() != RootBeanDefinition.DEPENDENCY_CHECK_NONE); if (hasInstAwareBpps || needsDepCheck) { PropertyDescriptor[] filteredPds = filterPropertyDescriptorsForDependencyCheck(bw, mbd.allowCaching); if (hasInstAwareBpps) { for (BeanPostProcessor bp : getBeanPostProcessors()) { if (bp instanceof InstantiationAwareBeanPostProcessor) { //找到这个接口的类,包括spring的和自己的, InstantiationAwareBeanPostProcessor ibp = (InstantiationAwareBeanPostProcessor) bp; pvs = ibp.postProcessPropertyValues(pvs, filteredPds, bw.getWrappedInstance(), beanName);//@Autoware,@Value的依赖注入。 AutowiredAnnotationBeanPostProcessor类的postProcessPropertyValues方法,依赖注入在这里。 if (pvs == null) { return; } } } } } applyPropertyValues(beanName, mbd, bw, pvs); //通过xml依赖注入, } AutowiredAnnotationBeanPostProcessor类: public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws BeansException { InjectionMetadata metadata = findResourceMetadata(beanName, bean.getClass()); //从缓存取,需要依赖注入的字段和方法,[FactoryBeanTest.woman, .FactoryBeanTest.setWoman(com.zhuguang.jack.testbean.Woman)], try { metadata.inject(bean, beanName, pvs);//依赖注入在这里。 } return pvs; } public void inject(Object target, String beanName, PropertyValues pvs) throws Throwable { Collection<InjectedElement> elementsToIterate = (this.checkedElements != null ? this.checkedElements : this.injectedElements); //[FactoryBeanTest.woman, FactoryBeanTest.setWoman(com.zhuguang.jack.testbean.Woman)], if (!elementsToIterate.isEmpty()) { for (InjectedElement element : elementsToIterate) { element.inject(target, beanName, pvs); //目标对象[email protected],bean名字factoryBeanTest,需要依赖注入的字段或者方法[bean property ‘woman‘] 。依赖注入在这里。 } } } //依赖注入字段。依赖注入在这里。 protected void inject(Object bean, String beanName, PropertyValues pvs) throws Throwable { Field field = (Field) this.member; //FactoryBeanTest.woman try { Object value; if (this.cached) { value = resolvedCachedArgument(beanName, this.cachedFieldValue); } else { DependencyDescriptor desc = new DependencyDescriptor(field, this.required); desc.setContainingClass(bean.getClass()); Set<String> autowiredBeanNames = new LinkedHashSet<String>(1); TypeConverter typeConverter = beanFactory.getTypeConverter(); value = beanFactory.resolveDependency(desc, beanName, autowiredBeanNames, typeConverter);//拿到依赖注入的属性的值,[email protected] synchronized (this) { if (!this.cached) { if (value != null || this.required) { this.cachedFieldValue = desc; registerDependentBeans(beanName, autowiredBeanNames); } this.cached = true; } } } if (value != null) {//[email protected] ReflectionUtils.makeAccessible(field); field.set(bean, value); //字段设置值 } } } } public Object resolveDependency(DependencyDescriptor descriptor, String beanName, Set<String> autowiredBeanNames, TypeConverter typeConverter) throws BeansException { else { if (result == null) { result = doResolveDependency(descriptor, beanName, autowiredBeanNames, typeConverter); } return result;//[email protected] } } public Object doResolveDependency(DependencyDescriptor descriptor, String beanName, Set<String> autowiredBeanNames, TypeConverter typeConverter) throws BeansException { Class<?> type = descriptor.getDependencyType(); //class com.zhuguang.jack.testbean.Woman Object value = getAutowireCandidateResolver().getSuggestedValue(descriptor); if (value != null) { if (value instanceof String) { String strVal = resolveEmbeddedValue((String) value); BeanDefinition bd = (beanName != null && containsBean(beanName) ? getMergedBeanDefinition(beanName) : null); value = evaluateBeanDefinitionString(strVal, bd); } TypeConverter converter = (typeConverter != null ? typeConverter : getTypeConverter()); return (descriptor.getField() != null ? converter.convertIfNecessary(value, type, descriptor.getField()) : converter.convertIfNecessary(value, type, descriptor.getMethodParameter())); } if (type.isArray()) { //依赖注入的是数组 Class<?> componentType = type.getComponentType(); DependencyDescriptor targetDesc = new DependencyDescriptor(descriptor); targetDesc.increaseNestingLevel(); Map<String, Object> matchingBeans = findAutowireCandidates(beanName, componentType, targetDesc); if (matchingBeans.isEmpty()) { if (descriptor.isRequired()) { raiseNoSuchBeanDefinitionException(componentType, "array of " + componentType.getName(), descriptor); } return null; } if (autowiredBeanNames != null) { autowiredBeanNames.addAll(matchingBeans.keySet()); } TypeConverter converter = (typeConverter != null ? typeConverter : getTypeConverter()); Object result = converter.convertIfNecessary(matchingBeans.values(), type); if (this.dependencyComparator != null && result instanceof Object[]) { Arrays.sort((Object[]) result, this.dependencyComparator); } return result; } else if (Collection.class.isAssignableFrom(type) && type.isInterface()) { //依赖注入的是集合 Class<?> elementType = descriptor.getCollectionType(); if (elementType == null) { if (descriptor.isRequired()) { throw new FatalBeanException("No element type declared for collection [" + type.getName() + "]"); } return null; } DependencyDescriptor targetDesc = new DependencyDescriptor(descriptor); targetDesc.increaseNestingLevel(); Map<String, Object> matchingBeans = findAutowireCandidates(beanName, elementType, targetDesc); if (matchingBeans.isEmpty()) { if (descriptor.isRequired()) { raiseNoSuchBeanDefinitionException(elementType, "collection of " + elementType.getName(), descriptor); } return null; } if (autowiredBeanNames != null) { autowiredBeanNames.addAll(matchingBeans.keySet()); } TypeConverter converter = (typeConverter != null ? typeConverter : getTypeConverter()); Object result = converter.convertIfNecessary(matchingBeans.values(), type); if (this.dependencyComparator != null && result instanceof List) { Collections.sort((List<?>) result, this.dependencyComparator); } return result; } else if (Map.class.isAssignableFrom(type) && type.isInterface()) { //依赖注入的是MAp Class<?> keyType = descriptor.getMapKeyType(); if (keyType == null || !String.class.isAssignableFrom(keyType)) { if (descriptor.isRequired()) { throw new FatalBeanException("Key type [" + keyType + "] of map [" + type.getName() + "] must be assignable to [java.lang.String]"); } return null; } Class<?> valueType = descriptor.getMapValueType(); if (valueType == null) { if (descriptor.isRequired()) { throw new FatalBeanException("No value type declared for map [" + type.getName() + "]"); } return null; } DependencyDescriptor targetDesc = new DependencyDescriptor(descriptor); targetDesc.increaseNestingLevel(); Map<String, Object> matchingBeans = findAutowireCandidates(beanName, valueType, targetDesc); if (matchingBeans.isEmpty()) { if (descriptor.isRequired()) { raiseNoSuchBeanDefinitionException(valueType, "map with value type " + valueType.getName(), descriptor); } return null; } if (autowiredBeanNames != null) { autowiredBeanNames.addAll(matchingBeans.keySet()); } return matchingBeans; } else { //依赖注入不是数组,不是Map,不是集合,是基本类型或者对象, Map<String, Object> matchingBeans = findAutowireCandidates(beanName, type, descriptor); //{[email protected]},从bean工厂获取,最终还是通过getBean()方法获取。 if (matchingBeans.size() > 1) {//依赖注入的类有多个,报错。 String primaryBeanName = determinePrimaryCandidate(matchingBeans, descriptor); if (primaryBeanName == null) { throw new NoUniqueBeanDefinitionException(type, matchingBeans.keySet()); } if (autowiredBeanNames != null) { autowiredBeanNames.add(primaryBeanName); } return matchingBeans.get(primaryBeanName); } Map.Entry<String, Object> entry = matchingBeans.entrySet().iterator().next(); if (autowiredBeanNames != null) { autowiredBeanNames.add(entry.getKey()); } return entry.getValue();//[email protected] } } protected Map<String, Object> findAutowireCandidates( String beanName, Class<?> requiredType, DependencyDescriptor descriptor) { for (String candidateName : candidateNames) { if (!candidateName.equals(beanName) && isAutowireCandidate(candidateName, descriptor)) { result.put(candidateName, getBean(candidateName)); //还是通过getBean()方法获取需要依赖注入的属性的值, } } return result; } //方法的依赖注入,依赖注入在这里。通过反射给方法设置值,形参通过getBean()方法获取。 protected void inject(Object bean, String beanName, PropertyValues pvs) throws Throwable { else { Object arg = beanFactory.resolveDependency(desc, beanName, autowiredBeanNames, typeConverter); if (arg == null && !this.required) { arguments = null; break; } arguments[i] = arg; } } if (arguments != null) { ReflectionUtils.makeAccessible(method); method.invoke(bean, arguments); //通过反射给方法设置值,形参通过getBean()方法获取。 } } } 上main是通过注解的依赖注入,还有通过XML的依赖注入。 protected void applyPropertyValues(String beanName, BeanDefinition mbd, BeanWrapper bw, PropertyValues pvs) { //通过xml依赖注入, MutablePropertyValues mpvs = null; List<PropertyValue> original; if (System.getSecurityManager() != null) { if (bw instanceof BeanWrapperImpl) { ((BeanWrapperImpl) bw).setSecurityContext(getAccessControlContext()); } } if (pvs instanceof MutablePropertyValues) { mpvs = (MutablePropertyValues) pvs; if (mpvs.isConverted()) { try { bw.setPropertyValues(mpvs); return; } } original = mpvs.getPropertyValueList(); //[bean property ‘woman‘],需要xml依赖注入的属性, } else { original = Arrays.asList(pvs.getPropertyValues()); //[bean property ‘woman‘],需要xml依赖注入的属性, } TypeConverter converter = getCustomTypeConverter(); if (converter == null) { converter = bw; } BeanDefinitionValueResolver valueResolver = new BeanDefinitionValueResolver(this, beanName, mbd, converter); List<PropertyValue> deepCopy = new ArrayList<PropertyValue>(original.size()); boolean resolveNecessary = false; for (PropertyValue pv : original) { else { String propertyName = pv.getName();//woman, Object originalValue = pv.getValue();//<woman>,RuntimeBeanReference类型, Object resolvedValue = valueResolver.resolveValueIfNecessary(pv, originalValue); //beanFactory.getBean(refName);从bean工厂拿。因为依赖注入的属性有可能是一个引用,有可能是一个字符串需要转换成时间, Object convertedValue = resolvedValue; //[email protected] boolean convertible = bw.isWritableProperty(propertyName) &&!PropertyAccessorUtils.isNestedOrIndexedProperty(propertyName); if (convertible) { convertedValue = convertForProperty(resolvedValue, propertyName, bw, converter);//[email protected],类型转换之后的值。上面的valueResolver.resolveValueIfNecessary(pv, originalValue)有可能转换还不够,还需要转换, } if (resolvedValue == originalValue) { if (convertible) { pv.setConvertedValue(convertedValue); } deepCopy.add(pv); } else if (convertible && originalValue instanceof TypedStringValue && !((TypedStringValue) originalValue).isDynamic() && !(convertedValue instanceof Collection || ObjectUtils.isArray(convertedValue))) { pv.setConvertedValue(convertedValue); deepCopy.add(pv); } else { resolveNecessary = true; deepCopy.add(new PropertyValue(pv, convertedValue)); //pv, convertedValue一个是原始属性值,一个是转换之后的值。封装成PropertyValue, } } } try { bw.setPropertyValues(new MutablePropertyValues(deepCopy)); //设置值,MutablePropertyValues才是需要真正设置的值。 } } public void setPropertyValue(PropertyValue pv) throws BeansException { PropertyTokenHolder tokens = (PropertyTokenHolder) pv.resolvedTokens; if (tokens == null) { String propertyName = pv.getName(); BeanWrapperImpl nestedBw; try { nestedBw = getBeanWrapperForPropertyPath(propertyName); } tokens = getPropertyNameTokens(getFinalPath(nestedBw, propertyName)); if (nestedBw == this) { pv.getOriginalPropertyValue().resolvedTokens = tokens; } nestedBw.setPropertyValue(tokens, pv); } else { setPropertyValue(tokens, pv); } } protected Object initializeBean(final String beanName, final Object bean, RootBeanDefinition mbd) { else { invokeAwareMethods(beanName, bean); } Object wrappedBean = bean; if (mbd == null || !mbd.isSynthetic()) { wrappedBean = applyBeanPostProcessorsBeforeInitialization(wrappedBean, beanName); } try { invokeInitMethods(beanName, wrappedBean, mbd); } if (mbd == null || !mbd.isSynthetic()) { wrappedBean = applyBeanPostProcessorsAfterInitialization(wrappedBean, beanName); } return wrappedBean; } public Object applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName) throws BeansException { Object result = existingBean; for (BeanPostProcessor beanProcessor : getBeanPostProcessors()) { result = beanProcessor.postProcessBeforeInitialization(result, beanName); if (result == null) { return result; } } return result; } private void invokeAwareMethods(final String beanName, final Object bean) { if (bean instanceof Aware) { if (bean instanceof BeanNameAware) { ((BeanNameAware) bean).setBeanName(beanName); } if (bean instanceof BeanClassLoaderAware) { ((BeanClassLoaderAware) bean).setBeanClassLoader(getBeanClassLoader()); } if (bean instanceof BeanFactoryAware) { ((BeanFactoryAware) bean).setBeanFactory(AbstractAutowireCapableBeanFactory.this); } } } protected void invokeInitMethods(String beanName, final Object bean, RootBeanDefinition mbd)throws Throwable { boolean isInitializingBean = (bean instanceof InitializingBean); if (isInitializingBean && (mbd == null || !mbd.isExternallyManagedInitMethod("afterPropertiesSet"))) { else { ((InitializingBean) bean).afterPropertiesSet(); //实例化bean的时候,调用afterPropertiesSet()方法,没有参数,做资源的加载(redis,mongodb的加载,),一个bean只会调用一次。在bean实例化之后,IOC之后调用。 } } if (mbd != null) { String initMethodName = mbd.getInitMethodName(); if (initMethodName != null && !(isInitializingBean && "afterPropertiesSet".equals(initMethodName)) && !mbd.isExternallyManagedInitMethod(initMethodName)) { invokeCustomInitMethod(beanName, bean, mbd); } } } protected void invokeCustomInitMethod(String beanName, final Object bean, RootBeanDefinition mbd) throws Throwable { String initMethodName = mbd.getInitMethodName(); //拿到init方法的名称,init-method, final Method initMethod = (mbd.isNonPublicAccessAllowed() ? BeanUtils.findMethod(bean.getClass(), initMethodName) : ClassUtils.getMethodIfAvailable(bean.getClass(), initMethodName)); //反射得到这个方法, else { try { ReflectionUtils.makeAccessible(initMethod); initMethod.invoke(bean); //调用, } } } protected void registerDisposableBeanIfNecessary(String beanName, Object bean, RootBeanDefinition mbd) { AccessControlContext acc = (System.getSecurityManager() != null ? getAccessControlContext() : null); if (!mbd.isPrototype() && requiresDestruction(bean, mbd)) { if (mbd.isSingleton()) { //单利,就缓存, registerDisposableBean(beanName, new DisposableBeanAdapter(bean, beanName, mbd, getBeanPostProcessors(), acc)); } else { Scope scope = this.scopes.get(mbd.getScope()); if (scope == null) { throw new IllegalStateException("No Scope registered for scope ‘" + mbd.getScope() + ""); } scope.registerDestructionCallback(beanName, new DisposableBeanAdapter(bean, beanName, mbd, getBeanPostProcessors(), acc)); } } } public void registerDisposableBean(String beanName, DisposableBean bean) { synchronized (this.disposableBeans) { this.disposableBeans.put(beanName, bean); } }
                  相关文章
                  相关标签/搜索
                  何仙姑六肖期期准资料 临沧市| 南开区| 望江县| 清涧县| 凭祥市| 定兴县| 凤冈县| 白城市| 东乌珠穆沁旗| 桦南县| 泽库县| 塔河县| 惠来县| 宜宾市| 大兴区| 娄烦县| 巴彦淖尔市| 元氏县| 琼结县| 视频| 华安县| 灵丘县| 衡东县| 陆河县| 皋兰县| 安庆市| 合江县| 宝丰县| 拜泉县| 盐亭县| 无棣县| 新乐市| 双鸭山市| 随州市| 澎湖县| 长岛县| 柳江县| 普兰店市| 重庆市| 丹寨县| 三穗县| 双江| 建瓯市| 轮台县| 洱源县| 石台县| 二连浩特市| 中阳县| 邵阳市| 铁岭县| 含山县| 安龙县| 彩票| 于都县| 揭西县| 方城县| 蓝山县| 盖州市| 出国| 昭苏县| 富源县| 安陆市| 曲周县| 鄂州市| 班戈县| 磐石市| 七台河市| 汾阳市| 淮安市| 新巴尔虎左旗| 营山县| 葫芦岛市| 庆城县| 项城市| 乌拉特前旗| 嵊泗县| 津市市| 汾西县| 大姚县| 微博| 荔浦县| 石阡县| 云龙县| 余庆县| 西青区| 翁牛特旗| 海盐县| 阿拉善左旗| 涿州市| 安塞县| 江门市| 博客| 陇川县| 延吉市| 璧山县| 泸水县| 互助| 甘德县| 平泉县| 湖口县| 牡丹江市| 恩平市| 木兰县| 凤凰县| 阜新市| 射洪县| 玉田县| 东乡县| 江城| 德安县| 岳阳市| 丰城市| 大英县| 四会市| 乌海市| 唐海县| 华亭县| 色达县| 隆回县| 扶余县| 永清县| 威信县| 赤城县| 尚志市| 平阴县| 保康县| 安化县| 哈巴河县| 玉山县| 清水河县| 德昌县| 霞浦县| 玛沁县| 巫溪县| 土默特右旗| 金塔县| 陆丰市| 禄丰县| 丹寨县| 边坝县| 阿鲁科尔沁旗| 民丰县| 宁蒗| 慈利县| 衡水市| 疏附县| 珠海市| 霍林郭勒市| 辛集市| 雷波县| 循化| 东台市| 郓城县| 贡觉县| 门头沟区| 宾阳县| 铜梁县| 油尖旺区| 佛冈县| 肇庆市| 鄂州市| 襄汾县| 梅州市| 兰考县| 沙河市| 洪雅县| 牡丹江市| 湖州市| 历史| 尉犁县| 清丰县| 崇州市| 大足县| 旺苍县| 宁化县| 菏泽市| 濉溪县| 玉田县| 化德县| 任丘市| 临沧市| 健康| 镶黄旗| 郸城县| 叙永县| 逊克县| 庐江县| 东至县| 方正县| 灵台县| 黔西| 隆林| 运城市| 女性| 泗阳县| 奎屯市| 桐乡市| 定结县| 新绛县| 龙井市| 湖南省| 万宁市| 易门县| 长沙县| 淮南市| 溧阳市| 东宁县| 宝鸡市| 南城县| 阿城市| 绵竹市| 高碑店市| 昌图县| 涟源市| 吴旗县| 顺平县| 临颍县| 绥阳县| 青河县| 富平县| 壤塘县| 中卫市| 洛川县| 临安市| 额尔古纳市| 漾濞| 东阿县| 错那县| 界首市| 远安县| 略阳县| 临泉县| 汶川县| 定襄县| 苍山县| 巴彦淖尔市| 漠河县| 宁夏| 保定市| 晋宁县| 民县| 丽江市| 舟山市| 水城县| 合肥市| 永胜县| 环江| 恭城| 大冶市| 自贡市| 兴宁市| 仙桃市| 绥化市| 成安县| 治多县| 靖西县| 巴林右旗| 永寿县| 吴江市| 思南县| 沁源县| 横峰县| 通海县| 手机| 陕西省| 榆社县| 图片| 苍溪县| 大英县| 彭泽县| 象山县| 抚顺县| 炉霍县| 罗定市| 运城市| 莱西市| 定安县| 南京市| 宁陵县| 双江| 南充市| 湘西| 云南省| 隆德县| 略阳县| 贞丰县| 聂拉木县| 阜南县| 桃园市| 岗巴县| 洛宁县| 海城市| 灌阳县| 凌源市| 崇仁县| 大渡口区| 凯里市| 南丰县| 广昌县| 湛江市| 呈贡县| 钦州市| 高要市| 田东县| 上饶市| 陵川县| 翁牛特旗| 虞城县| 旌德县| 西贡区| 宿松县| 陆川县| 丰宁| 西安市| 巨鹿县| 江西省| 龙里县| 平凉市| 玛沁县| 屏东县| 宜章县| 鄂尔多斯市| 白沙| 崇义县| 新闻| 正镶白旗| 普宁市| 明星| 彰化县| 逊克县| 靖远县| 霸州市| 盐城市| 黑龙江省| 逊克县| 栾川县| 永嘉县| 北京市| 香格里拉县| 神农架林区| 西峡县| 科技| 工布江达县| 龙山县| 久治县| 大石桥市| 文水县| 西乌珠穆沁旗| 武安市| 铁岭县| 双辽市| 乌鲁木齐县| 灵寿县| 伊吾县| 曲松县| 聂荣县| 许昌县| 乳源| 满洲里市| 新邵县| 区。| 阳东县| 民丰县| 乌兰察布市| 西畴县| 特克斯县| 弥渡县| 迭部县| 襄汾县| 彭阳县| 大城县| 贵州省| 马山县| 太谷县| 祥云县| 石狮市| 商南县| 衢州市| 菏泽市| 晋宁县| 新营市| 金山区| 林西县| 建平县| 阿荣旗| 洛扎县| 祁门县| 巨鹿县| 彭山县| 睢宁县| 恭城| 壶关县| 江都市| 湟中县| 昌黎县| 松潘县| 克拉玛依市| 繁昌县| 项城市| 汨罗市| 河池市| 壤塘县| 洛扎县| 察隅县| 洪洞县| 瓮安县| 呼伦贝尔市| 古交市| 沂源县| 加查县| 安仁县| 西安市| 图们市| 石渠县| 黄骅市| 云霄县| 内乡县| 正阳县| 隆昌县| 扶绥县| 鹰潭市| 咸阳市| 罗平县| 上蔡县| 卓资县| 高邑县| 涟源市| 乐安县| 东乡| 辉南县| 巩义市| 江城| 玛沁县| 都安| 阆中市| 天全县| 富民县| 丰都县| 万安县| 兴安盟| 乐都县| 烟台市| 武功县| 青州市| 蕉岭县| 中超| 仙居县| 桐庐县| 团风县| 宁南县| 苏尼特左旗| 宁化县| 泉州市| 安庆市| 河西区| 平安县| 榕江县| 安庆市| 正镶白旗| 安宁市| 乌拉特前旗| 富蕴县| 南汇区| 阳朔县| 绥江县| 兴义市| 吉木萨尔县| 肥东县| 宁阳县| 兖州市| 寻乌县| 唐山市| 长武县| 英德市| 泰安市| 怀安县| 历史| 吉林省| 广安市| 车致| 万安县| 甘谷县| 漾濞| 子洲县| 青铜峡市| 班玛县| 昌平区| 壶关县| 庄浪县| 浪卡子县| 延安市| 元谋县| 大关县| 淮滨县| 斗六市| 文昌市| 鄂尔多斯市| 黎城县| 乐昌市| 武强县| 林西县| 乌兰浩特市| 米脂县| 拜城县| 禄劝| 铜梁县| 苍山县| 朝阳县| 呈贡县| 五河县| 穆棱市| 海口市| 鄂托克旗| 长沙市| 达日县| 永兴县| 德钦县| 景东| 疏附县| 交口县| 嘉定区| 营口市| 陵川县| 高台县| 得荣县| 乐陵市| 博乐市| 遵义市| 铜梁县| 阿荣旗| 筠连县| 馆陶县| 合江县| 新巴尔虎右旗| 鹿邑县| 比如县| 秦皇岛市| 惠来县| 云安县| 元谋县| 理塘县| 沅江市| 荥阳市| 荣成市| 淮南市| 东光县| 三台县| 凤城市| 隆德县| 弋阳县| 和硕县| 睢宁县| 钦州市| 毕节市| 宜君县| 毕节市| 龙山县| 上高县| 武穴市| 新泰市| 广平县| 曲水县| 永新县| 轮台县| 兰考县| 沙湾县| 上犹县| 彭州市| 抚顺市| 罗江县| 腾冲县| 纳雍县| 岚皋县| 鄂尔多斯市| 威信县| 翁源县| 德兴市| 镇平县| 克什克腾旗| 故城县| 冕宁县| 尉氏县| 报价| 沂南县| 惠水县| 互助| 遵义县| 紫云| 申扎县| 礼泉县| 古蔺县| 静宁县| 金阳县| 绥阳县| 镇远县| 新野县| 二手房| 惠水县| 铜鼓县| 紫云| 瑞金市| 临澧县| 江川县| 黄浦区| 巴东县| 乡城县| 定西市| 额敏县| 治多县| 东乡| 城口县| 登封市| 长汀县| 金平| 博罗县| http://wap.hz0j0r8vo.fun http://www.jx1870flashv.fun http://jx1870izpactv.fun http://m.jx1870icev.fun http://www.jx1870indicatev.fun http://wap.jx1870fuckv.fun http://jx1870interestv.fun http://www.jx1870flowv.fun http://www.jx1870gunv.fun http://www.jx1870gov.fun http://hz0j3r4vo.fun http://www.jx1870inputv.fun http://www.jx1870inkv.fun http://jx1870evidencev.fun http://wap.jx1870indexv.fun http://m.hz0j1r3vo.fun http://www.jx1870ensurev.fun http://www.jx1870grantv.fun