类 BeanDefinitionOverrideException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.beans.BeansException
- org.springframework.beans.FatalBeanException
- org.springframework.beans.factory.BeanDefinitionStoreException
- org.springframework.beans.factory.support.BeanDefinitionOverrideException
- 所有已实现的接口:
Serializable
public class BeanDefinitionOverrideException extends BeanDefinitionStoreException
Subclass ofBeanDefinitionStoreException
indicating an invalid override attempt: typically registering a new definition for the same bean name whileDefaultListableBeanFactory.isAllowBeanDefinitionOverriding()
isfalse
.
构造器概要
构造器 构造器 说明 BeanDefinitionOverrideException(String beanName, BeanDefinition beanDefinition, BeanDefinition existingDefinition)
Create a new BeanDefinitionOverrideException for the given new and existing definition.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 BeanDefinition
getBeanDefinition()
Return the newly registered bean definition.String
getBeanName()
Return the name of the bean.BeanDefinition
getExistingDefinition()
Return the existing bean definition for the same name.String
getResourceDescription()
Return the description of the resource that the bean definition came from.从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
构造器详细资料
BeanDefinitionOverrideException
public BeanDefinitionOverrideException(String beanName, BeanDefinition beanDefinition, BeanDefinition existingDefinition)
Create a new BeanDefinitionOverrideException for the given new and existing definition.- 参数:
beanName
- the name of the beanbeanDefinition
- the newly registered bean definitionexistingDefinition
- the existing bean definition for the same name
方法详细资料
getResourceDescription
@NonNull public String getResourceDescription()
Return the description of the resource that the bean definition came from.
getBeanName
@NonNull public String getBeanName()
Return the name of the bean.
getBeanDefinition
public BeanDefinition getBeanDefinition()
Return the newly registered bean definition.- 另请参阅:
getBeanName()
getExistingDefinition
public BeanDefinition getExistingDefinition()
Return the existing bean definition for the same name.- 另请参阅:
getBeanName()