类的使用
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 theorg.springframework.beans.factorypackage.org.springframework.context.annotation Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.org.springframework.context.support Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.org.springframework.jndi.support Support classes for JNDI usage, including a JNDI-based BeanFactory implementation.org.springframework.orm.jpa Package providing integration of JPA (Java Persistence API) with Spring concepts.org.springframework.orm.jpa.support Classes supporting theorg.springframework.orm.jpapackage.org.springframework.beans.factory中NoSuchBeanDefinitionException的使用
org.springframework.beans.factory中NoSuchBeanDefinitionException的子类 修饰符和类型 类 说明 classNoUniqueBeanDefinitionExceptionException thrown when aBeanFactoryis 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>
AListableBeanFactory. findAnnotationOnBean(String beanName, Class<A> annotationType)Find anAnnotationofannotationTypeon the specified bean, traversing its interfaces and super classes if no annotation can be found on the given class itself, as well as checking the bean's factory method (if any).Class<?>BeanFactory. getType(String name)Determine the type of the bean with the given name.Class<?>BeanFactory. getType(String name, boolean allowFactoryBeanInit)Determine the type of the bean with the given name.booleanBeanFactory. isPrototype(String name)Is this bean a prototype?booleanBeanFactory. isSingleton(String name)Is this bean a shared singleton?booleanBeanFactory. isTypeMatch(String name, Class<?> typeToMatch)Check whether the bean with the given name matches the specified type.booleanBeanFactory. isTypeMatch(String name, ResolvableType typeToMatch)Check whether the bean with the given name matches the specified type.org.springframework.beans.factory.config中NoSuchBeanDefinitionException的使用
抛出NoSuchBeanDefinitionException的org.springframework.beans.factory.config中的方法 修饰符和类型 方法 说明 BeanDefinitionConfigurableListableBeanFactory. 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).BeanDefinitionConfigurableBeanFactory. getMergedBeanDefinition(String beanName)Return a merged BeanDefinition for the given bean name, merging a child bean definition with its parent if necessary.booleanConfigurableListableBeanFactory. 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.booleanConfigurableBeanFactory. 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>
ADefaultListableBeanFactory. findAnnotationOnBean(String beanName, Class<A> annotationType)<A extends Annotation>
AStaticListableBeanFactory. findAnnotationOnBean(String beanName, Class<A> annotationType)BeanDefinitionBeanDefinitionRegistry. getBeanDefinition(String beanName)Return the BeanDefinition for the given bean name.BeanDefinitionDefaultListableBeanFactory. getBeanDefinition(String beanName)BeanDefinitionSimpleBeanDefinitionRegistry. getBeanDefinition(String beanName)Class<?>AbstractBeanFactory. getType(String name)Class<?>AbstractBeanFactory. getType(String name, boolean allowFactoryBeanInit)Class<?>StaticListableBeanFactory. getType(String name)Class<?>StaticListableBeanFactory. getType(String name, boolean allowFactoryBeanInit)booleanDefaultListableBeanFactory. isAutowireCandidate(String beanName, DependencyDescriptor descriptor)protected booleanDefaultListableBeanFactory. 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.booleanAbstractBeanFactory. isFactoryBean(String name)booleanAbstractBeanFactory. isPrototype(String name)booleanStaticListableBeanFactory. isPrototype(String name)booleanAbstractBeanFactory. isSingleton(String name)booleanStaticListableBeanFactory. isSingleton(String name)booleanAbstractBeanFactory. isTypeMatch(String name, Class<?> typeToMatch)booleanAbstractBeanFactory. isTypeMatch(String name, ResolvableType typeToMatch)protected booleanAbstractBeanFactory. isTypeMatch(String name, ResolvableType typeToMatch, boolean allowFactoryBeanInit)Internal extended variant ofAbstractBeanFactory.isTypeMatch(String, ResolvableType)to check whether the bean with the given name matches the specified type.booleanStaticListableBeanFactory. isTypeMatch(String name, Class<?> typeToMatch)booleanStaticListableBeanFactory. isTypeMatch(String name, ResolvableType typeToMatch)voidBeanDefinitionRegistry. removeBeanDefinition(String beanName)Remove the BeanDefinition for the given name.voidDefaultListableBeanFactory. removeBeanDefinition(String beanName)voidSimpleBeanDefinitionRegistry. removeBeanDefinition(String beanName)org.springframework.context.annotation中NoSuchBeanDefinitionException的使用
抛出NoSuchBeanDefinitionException的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 protected ObjectCommonAnnotationBeanPostProcessor. autowireResource(BeanFactory factory, CommonAnnotationBeanPostProcessor.LookupElement element, String requestingBeanName)Obtain a resource object for the given name and type through autowiring based on the given factory.protected ObjectCommonAnnotationBeanPostProcessor. getResource(CommonAnnotationBeanPostProcessor.LookupElement element, String requestingBeanName)Obtain the resource object for the given name and type.org.springframework.context.support中NoSuchBeanDefinitionException的使用
抛出NoSuchBeanDefinitionException的org.springframework.context.support中的方法 修饰符和类型 方法 说明 <A extends Annotation>
AAbstractApplicationContext. findAnnotationOnBean(String beanName, Class<A> annotationType)BeanDefinitionGenericApplicationContext. getBeanDefinition(String beanName)Class<?>AbstractApplicationContext. getType(String name)Class<?>AbstractApplicationContext. getType(String name, boolean allowFactoryBeanInit)booleanAbstractApplicationContext. isPrototype(String name)booleanAbstractApplicationContext. isSingleton(String name)booleanAbstractApplicationContext. isTypeMatch(String name, Class<?> typeToMatch)booleanAbstractApplicationContext. isTypeMatch(String name, ResolvableType typeToMatch)voidGenericApplicationContext. removeBeanDefinition(String beanName)org.springframework.jndi.support中NoSuchBeanDefinitionException的使用
抛出NoSuchBeanDefinitionException的org.springframework.jndi.support中的方法 修饰符和类型 方法 说明 Class<?>SimpleJndiBeanFactory. getType(String name)Class<?>SimpleJndiBeanFactory. getType(String name, boolean allowFactoryBeanInit)booleanSimpleJndiBeanFactory. isPrototype(String name)booleanSimpleJndiBeanFactory. isSingleton(String name)booleanSimpleJndiBeanFactory. isTypeMatch(String name, Class<?> typeToMatch)booleanSimpleJndiBeanFactory. isTypeMatch(String name, ResolvableType typeToMatch)org.springframework.orm.jpa中NoSuchBeanDefinitionException的使用
抛出NoSuchBeanDefinitionException的org.springframework.orm.jpa中的方法 修饰符和类型 方法 说明 static EntityManagerFactoryEntityManagerFactoryUtils. findEntityManagerFactory(ListableBeanFactory beanFactory, String unitName)Find an EntityManagerFactory with the given name in the given Spring application context (represented as ListableBeanFactory).org.springframework.orm.jpa.support中NoSuchBeanDefinitionException的使用
抛出NoSuchBeanDefinitionException的org.springframework.orm.jpa.support中的方法 修饰符和类型 方法 说明 protected EntityManagerFactoryPersistenceAnnotationBeanPostProcessor. findDefaultEntityManagerFactory(String requestingBeanName)Find a single default EntityManagerFactory in the Spring application context.protected EntityManagerFactoryPersistenceAnnotationBeanPostProcessor. findEntityManagerFactory(String unitName, String requestingBeanName)Find an EntityManagerFactory with the given name in the current Spring application context, falling back to a single default EntityManagerFactory (if any) in case of no unit name specified.protected EntityManagerFactoryPersistenceAnnotationBeanPostProcessor. findNamedEntityManagerFactory(String unitName, String requestingBeanName)Find an EntityManagerFactory with the given name in the current Spring application context.