Class BeanDefinitionOverrideException

All Implemented Interfaces:
Serializable

public class BeanDefinitionOverrideException extends BeanDefinitionStoreException
Subclass of BeanDefinitionStoreException indicating an invalid override attempt: typically registering a new definition for the same bean name while DefaultListableBeanFactory.isAllowBeanDefinitionOverriding() is false.
Since:
5.1
Author:
Juergen Hoeller
See Also:
  • 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 bean
      beanDefinition - the newly registered bean definition
      existingDefinition - the existing bean definition for the same name
  • Method Details