public class BeanDefinitionOverrideException extends BeanDefinitionStoreException
BeanDefinitionStoreException
indicating an invalid override
attempt: typically registering a new definition for the same bean name while
DefaultListableBeanFactory.isAllowBeanDefinitionOverriding()
is false
.Constructor and Description |
---|
BeanDefinitionOverrideException(String beanName,
BeanDefinition beanDefinition,
BeanDefinition existingDefinition)
Create a new BeanDefinitionOverrideException for the given new and existing definition.
|
Modifier and Type | Method and Description |
---|---|
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.
|
contains, getMessage, getMostSpecificCause, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public BeanDefinitionOverrideException(String beanName, BeanDefinition beanDefinition, BeanDefinition existingDefinition)
beanName
- the name of the beanbeanDefinition
- the newly registered bean definitionexistingDefinition
- the existing bean definition for the same name@NonNull public String getResourceDescription()
getResourceDescription
in class BeanDefinitionStoreException
@NonNull public String getBeanName()
getBeanName
in class BeanDefinitionStoreException
public BeanDefinition getBeanDefinition()
getBeanName()
public BeanDefinition getExistingDefinition()
getBeanName()