The enum constants in BeanOverrideStrategy reflect our initial understanding of how the Bean Override feature would work; however, we no longer create or replace BeanDefinitions in general.

We only create a BeanDefinition when the user has requested to override a bean that doesn't exist, and we never replace a BeanDefinition.

Furthermore, the Bean Override feature is not limited to beans that have a BeanDefinition. On the contrary, we actually support overrides for manually registered singletons.

In light of the above, we should rename the enum constants in BeanOverrideStrategy and revise the documentation (Javadoc and reference manual).

I recommend the following renaming.

  • REPLACE_DEFINITIONREPLACE
  • REPLACE_OR_CREATE_DEFINITIONREPLACE_OR_CREATE
  • WRAP_BEANWRAP