Class 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
- All Implemented Interfaces:
Serializable
Subclass of
BeanDefinitionStoreException
indicating an invalid override
attempt: typically registering a new definition for the same bean name while
DefaultListableBeanFactory.isAllowBeanDefinitionOverriding()
is false
.-
Constructor Summary
ConstructorDescriptionBeanDefinitionOverrideException
(String beanName, BeanDefinition beanDefinition, BeanDefinition existingDefinition) Create a new BeanDefinitionOverrideException for the given new and existing definition. -
Method Summary
Modifier and TypeMethodDescriptionReturn the newly registered bean definition.Return the name of the bean.Return the existing bean definition for the same name.Return the description of the resource that the bean definition came from.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BeanDefinitionOverrideException
public BeanDefinitionOverrideException(String beanName, BeanDefinition beanDefinition, BeanDefinition existingDefinition) Create a new BeanDefinitionOverrideException for the given new and existing definition.- Parameters:
beanName
- the name of the beanbeanDefinition
- the newly registered bean definitionexistingDefinition
- the existing bean definition for the same name
-
-
Method Details
-
getResourceDescription
Return the description of the resource that the bean definition came from.- Overrides:
getResourceDescription
in classBeanDefinitionStoreException
-
getBeanName
Return the name of the bean.- Overrides:
getBeanName
in classBeanDefinitionStoreException
-
getBeanDefinition
Return the newly registered bean definition.- See Also:
-
getExistingDefinition
Return the existing bean definition for the same name.- See Also:
-