<address id="bjbhz"><dfn id="bjbhz"><output id="bjbhz"></output></dfn></address><address id="bjbhz"><dfn id="bjbhz"></dfn></address>
        <address id="bjbhz"><dfn id="bjbhz"></dfn></address>

        <sub id="bjbhz"><var id="bjbhz"><mark id="bjbhz"></mark></var></sub>
          <sub id="bjbhz"><var id="bjbhz"></var></sub>
          <sub id="bjbhz"><var id="bjbhz"><ins id="bjbhz"></ins></var></sub>

          <address id="bjbhz"><var id="bjbhz"></var></address>
          <address id="bjbhz"><dfn id="bjbhz"></dfn></address>

          <address id="bjbhz"><listing id="bjbhz"><ins id="bjbhz"></ins></listing></address>

            <thead id="bjbhz"></thead>

          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); } }
          相关文章
          相关标签/搜索
          管家婆香港2018年资料四肖期期准铁算盘4887开奖结果四肖三期内必出刘伯温6374cm刘伯温168最快开奖现场开马开奖结果天天彩票 泽普县| 顺平县| 永嘉县| 东兴市| 子长县| 名山县| 亚东县| 洛扎县| 霸州市| 重庆市| 万荣县| 抚松县| 怀远县| 霍山县| 金湖县| 宝山区| 德保县| 开封市| 麻城市| 阳信县| 安新县| 许昌市| 老河口市| 两当县| 林西县| 鲁甸县| 彰武县| 屯昌县| 武清区| 玉环县| 绥中县| 辽中县| 永胜县| 全南县| 建水县| 邵武市| 台湾省| 盈江县| 石景山区| 民权县| 阿勒泰市| 泾川县| 海伦市| 沁阳市| 岳阳市| 涟水县| 扶余县| 蒲城县| 南靖县| 霍州市| 建阳市| 华阴市| 东宁县| 铜梁县| 陆川县| 许昌市| 米易县| 论坛| 绥棱县| 涞水县| 海安县| 离岛区| 仪征市| 北川| 金山区| 永寿县| 公主岭市| 贵溪市| 东平县| 日照市| 金山区| 屯留县| 游戏| 乌兰浩特市| 肇源县| 琼海市| 莱西市| 盐城市| 双流县| 磐安县| 华容县| 兴业县| 山阴县| 安新县| 无锡市| 介休市| 绥中县| 永清县| 贡嘎县| 平顶山市| 黔东| 大洼县| 锦屏县| 积石山| 抚远县| 江永县| 中宁县| 晋江市| 沐川县| 昭通市| 桂东县| 衡阳县| 太康县| 湘潭县| 石狮市| 延长县| 闽清县| 尚义县| 湖南省| 财经| 万山特区| 高雄市| 介休市| 上饶市| 平舆县| 沙洋县| 南雄市| 郯城县| 法库县| 陇南市| 宜州市| 如东县| 兰坪| 翁源县| 元江| 自治县| 澄城县| 安龙县| 田东县| 桓台县| 济阳县| 柳林县| 景洪市| 泰州市| 商洛市| 乐安县| 山阳县| 濉溪县| 砚山县| 拜城县| 涿鹿县| 东宁县| 鞍山市| 广灵县| 洛川县| 册亨县| 宣汉县| 永和县| 仁怀市| 凤台县| 循化| 宜黄县| 扎鲁特旗| 台前县| 泰来县| 南雄市| 靖远县| 祁阳县| 富蕴县| 竹北市| 永德县| 广东省| 阿拉善右旗| 明水县| 定兴县| 靖州| 天津市| 平远县| 涟水县| 娱乐| 高州市| 玉门市| 白山市| 安溪县| 登封市| 休宁县| 临汾市| 金秀| 四子王旗| 郸城县| 阜阳市| 马龙县| 浦东新区| 德阳市| 山阴县| 安阳县| 黄陵县| 侯马市| 马鞍山市| 乌鲁木齐市| 鄂尔多斯市| 京山县| 开封县| 灌云县| 博乐市| 建始县| 张家港市| 南宁市| 滨海县| 巧家县| 天祝| 宣恩县| 嘉黎县| 文化| 奉新县| 齐河县| 罗定市| 抚州市| 凉城县| 新晃| 双江| 新民市| 昌吉市| 揭西县| 延寿县| 伽师县| 枣阳市| 峨边| 宜良县| 东台市| 临颍县| 贵港市| 榆社县| 高阳县| 阿拉善左旗| 南宫市| 察哈| 兰西县| 东丰县| 楚雄市| 广平县| 独山县| 沂源县| 周至县| 吴桥县| 都昌县| 建宁县| 竹山县| 夏津县| 东辽县| 丹凤县| 潮州市| 马鞍山市| 亚东县| 凌海市| 安化县| 望谟县| 宁晋县| 肇源县| 新化县| 宁津县| 慈利县| 石嘴山市| 资中县| 胶南市| 姜堰市| 睢宁县| 张家川| 阳新县| 建德市| 曲水县| 微山县| 新龙县| 临汾市| 湖州市| 铜梁县| 定州市| 衡水市| 瓦房店市| 晋州市| 闻喜县| 左云县| 新河县| 玉树县| 阳西县| 灌阳县| 屯留县| 班玛县| 永泰县| 乃东县| 河南省| 衡阳县| 牟定县| 轮台县| 天峻县| 巴中市| 上林县| 新干县| 临湘市| 博白县| 彭泽县| 福贡县| 鲁山县| 贵溪市| 城步| 大洼县| 古田县| 陆丰市| 开阳县| 巴青县| 秦皇岛市| 乌兰浩特市| 沭阳县| 安陆市| 湖北省| 平顶山市| 盱眙县| 达孜县| 兴安县| 萝北县| 黄冈市| 股票| 甘泉县| 手游| 巫溪县| 林芝县| 军事| 布尔津县| 皮山县| 青河县| 镇坪县| 杂多县| 米林县| 越西县| 宁都县| 新昌县| 河曲县| 恩平市| 射阳县| 志丹县| 扎兰屯市| 杭州市| 南木林县| 平乡县| 宁都县| 丰顺县| 高安市| 东海县| 太白县| 钦州市| 龙泉市| 高陵县| 德惠市| 黎平县| 舒兰市| 潼南县| 栾城县| 云霄县| 平远县| 县级市| 玛纳斯县| 波密县| 连州市| 中江县| 白银市| 周至县| 江永县| 奈曼旗| 申扎县| 浦江县| 称多县| 浦江县| 丰都县| 乐清市| 海阳市| 石渠县| 攀枝花市| 英德市| 富源县| 盐亭县| 隆回县| 泰安市| 凤城市| 开阳县| 德令哈市| 太湖县| 凯里市| 体育| 广宗县| 惠安县| 思南县| 屯留县| 台湾省| 新沂市| 乐安县| 杭州市| 高青县| 分宜县| 东山县| 集贤县| 平果县| 涞源县| 武隆县| 廊坊市| 恩施市| 昭苏县| 大石桥市| 平原县| 襄樊市| 繁昌县| 怀远县| 大丰市| 乐山市| 揭阳市| 千阳县| 当阳市| 西城区| 周至县| 华坪县| 泗水县| 手游| 扎赉特旗| 常德市| 平利县| 彭阳县| 祁连县| 鹿泉市| 乳源| 衡南县| 铜鼓县| 当涂县| 额尔古纳市| 乡宁县| 石林| 卢龙县| 南川市| 临汾市| 志丹县| 永定县| 邹平县| 陆良县| 大余县| 山丹县| 石渠县| 九龙县| 视频| 四会市| 大田县| 淳安县| 临猗县| 新闻| 明水县| 聂荣县| 铜山县| 师宗县| 正镶白旗| 抚松县| 枝江市| 兴安县| 浦县| 衡东县| 信丰县| 南昌县| 东乡县| 新民市| 云安县| 永安市| 西城区| 宁乡县| 屏东县| 项城市| 得荣县| 西城区| 潍坊市| 南充市| 科技| 麻江县| 广安市| 永靖县| 平果县| 灵山县| 宁海县| 北票市| 朔州市| 永年县| 乌什县| 德化县| 新巴尔虎左旗| 平果县| 大城县| 蒙山县| 休宁县| 婺源县| 合阳县| 邢台县| 五大连池市| 花垣县| 寿宁县| 喀喇沁旗| 关岭| 淳安县| 土默特左旗| 瑞安市| 马龙县| 新密市| 定边县| 辉南县| 许昌市| 西和县| 洛浦县| 阳城县| 新民市| 二连浩特市| 孟津县| 新安县| 汉寿县| 额济纳旗| 吴桥县| 高陵县| 湖南省| 黑龙江省| 玉树县| 泰州市| 东方市| 咸阳市| 南汇区| 临桂县| 东乡族自治县| 长乐市| 衡南县| 栾川县| 黎川县| 肇源县| 闵行区| 富蕴县| 岑巩县| 桐庐县| 兰州市| 盐山县| 黎平县| 宜阳县| 宕昌县| 达拉特旗| 泌阳县| 同仁县| 佛教| 海晏县| 手游| 岚皋县| 台江县| 广汉市| 龙泉市| 阳原县| 崇信县| 内江市| 五河县| 社会| 嘉善县| 合山市| 马公市| 塔河县| 邵武市| 水城县| 水城县| 绵竹市| 大渡口区| 佛坪县| 岐山县| 西青区| 万全县| 保定市| 乃东县| 长葛市| 泽州县| 清丰县| 体育| 白城市| 西城区| 青岛市| 彭泽县| 富民县| 曲水县| 彭山县| 定边县| 高碑店市| 杭锦后旗| 永靖县| 绥德县| 松溪县| 祁连县| 陆川县| 滁州市| 广东省| 元氏县| 龙南县| 拉萨市| 健康| 怀安县| 淮北市| 商城县| 蓝山县| 邛崃市| 南丰县| 赣榆县| 临夏县| 宜州市| 海宁市| 盖州市| 边坝县| 顺昌县| 长岭县| 资兴市| 曲周县| 长宁区| 剑河县| 房产| 乌审旗| 柘城县| 炎陵县| 北流市| 北碚区| 英德市| 邵武市| 乌恰县| 邵阳市| http://jx1870fortv.fun http://www.jx1870hozev.fun http://www.hz0j2r4vo.fun http://www.jx1870feev.fun http://wap.jx1870fishv.fun http://m.jx1870flowerv.fun http://m.jx1870grayv.fun http://wap.jx1870groundv.fun http://www.jx1870feelv.fun http://jx1870instruzentv.fun http://www.hz0j2r8vo.fun http://m.jx1870enlargev.fun http://m.jx1870firev.fun http://wap.jx1870lastv.fun http://wap.hz0j0r3vo.fun http://www.jx1870engineerv.fun http://wap.jx1870explainv.fun http://wap.jx1870fatv.fun