## 类的使用
org.springframework.beans.factory.NoSuchBeanDefinitionException

- 使用NoSuchBeanDefinitionException的程序包
  程序包 | 说明
  --- | ---
  org.springframework.beans.factory | The core package implementing Spring's lightweight Inversion of Control (IoC) container.
  org.springframework.beans.factory.config | SPI interfaces and configuration-related convenience classes for bean factories.
  org.springframework.beans.factory.support | Classes supporting the `org.springframework.beans.factory` package.

- - ### org.springframework.beans.factory中NoSuchBeanDefinitionException的使用

    org.springframework.beans.factory中NoSuchBeanDefinitionException的子类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `NoUniqueBeanDefinitionException` Exception thrown when a `BeanFactory` is asked for a bean instance for which multiple matching candidates have been found when only one matching bean was expected.

    抛出NoSuchBeanDefinitionException的org.springframework.beans.factory中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `<A extends Annotation> A` | ListableBeanFactory.`findAnnotationOnBean(String beanName, Class<A> annotationType)` 在指定name对应的Bean上找指定的注解，如果没有找到的话，去指定Bean的父类或者父接口上查找
    `Class<?>` | BeanFactory.`getType(String name)` 通过beanName获取对应bean的class类型
    `boolean` | BeanFactory.`isPrototype(String name)` 是不是原型的
    `boolean` | BeanFactory.`isSingleton(String name)` 判断当前的bean是不是单例的
    `boolean` | BeanFactory.`isTypeMatch(String name, Class<?> typeToMatch)` 是不是匹配的类型
    `boolean` | BeanFactory.`isTypeMatch(String name, org.springframework.core.ResolvableType typeToMatch)` 是不是匹配的类型 Will ask the parent factory if the bean cannot be found in this factory instance.

  - ### org.springframework.beans.factory.config中NoSuchBeanDefinitionException的使用

    抛出NoSuchBeanDefinitionException的org.springframework.beans.factory.config中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `BeanDefinition` | ConfigurableListableBeanFactory.`getBeanDefinition(String beanName)` Return the registered BeanDefinition for the specified bean, allowing access to its property values and constructor argument value (which can be modified during bean factory post-processing).
    `BeanDefinition` | ConfigurableBeanFactory.`getMergedBeanDefinition(String beanName)` Return a merged BeanDefinition for the given bean name, merging a child bean definition with its parent if necessary.
    `boolean` | ConfigurableListableBeanFactory.`isAutowireCandidate(String beanName, DependencyDescriptor descriptor)` Determine whether the specified bean qualifies as an autowire candidate, to be injected into other beans which declare a dependency of matching type.
    `boolean` | ConfigurableBeanFactory.`isFactoryBean(String name)` Determine whether the bean with the given name is a FactoryBean.

  - ### org.springframework.beans.factory.support中NoSuchBeanDefinitionException的使用

    抛出NoSuchBeanDefinitionException的org.springframework.beans.factory.support中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `<A extends Annotation> A` | DefaultListableBeanFactory.`findAnnotationOnBean(String beanName, Class<A> annotationType)`
    `<A extends Annotation> A` | StaticListableBeanFactory.`findAnnotationOnBean(String beanName, Class<A> annotationType)`
    `BeanDefinition` | BeanDefinitionRegistry.`getBeanDefinition(String beanName)` Return the BeanDefinition for the given bean name.
    `BeanDefinition` | DefaultListableBeanFactory.`getBeanDefinition(String beanName)` 从原始的bean定义map中获取
    `BeanDefinition` | SimpleBeanDefinitionRegistry.`getBeanDefinition(String beanName)`
    `Class<?>` | AbstractBeanFactory.`getType(String name)`
    `Class<?>` | StaticListableBeanFactory.`getType(String name)`
    `boolean` | DefaultListableBeanFactory.`isAutowireCandidate(String beanName, DependencyDescriptor descriptor)`
    `protected boolean` | DefaultListableBeanFactory.`isAutowireCandidate(String beanName, DependencyDescriptor descriptor, AutowireCandidateResolver resolver)` Determine whether the specified bean definition qualifies as an autowire candidate, to be injected into other beans which declare a dependency of matching type.
    `boolean` | AbstractBeanFactory.`isFactoryBean(String name)`
    `boolean` | AbstractBeanFactory.`isPrototype(String name)`
    `boolean` | StaticListableBeanFactory.`isPrototype(String name)`
    `boolean` | AbstractBeanFactory.`isSingleton(String name)`
    `boolean` | StaticListableBeanFactory.`isSingleton(String name)`
    `boolean` | AbstractBeanFactory.`isTypeMatch(String name, Class<?> typeToMatch)`
    `boolean` | StaticListableBeanFactory.`isTypeMatch(String name, Class<?> typeToMatch)`
    `boolean` | AbstractBeanFactory.`isTypeMatch(String name, org.springframework.core.ResolvableType typeToMatch)`
    `boolean` | StaticListableBeanFactory.`isTypeMatch(String name, org.springframework.core.ResolvableType typeToMatch)`
    `void` | BeanDefinitionRegistry.`removeBeanDefinition(String beanName)` Remove the BeanDefinition for the given name.
    `void` | DefaultListableBeanFactory.`removeBeanDefinition(String beanName)`
    `void` | SimpleBeanDefinitionRegistry.`removeBeanDefinition(String beanName)`