A BeanDefinition can have an init and destroy method name. While uncommon, it is possible for a bean to have more than one of those, see InitDestroyAnnotationBeanPostProcessor.

To replace the runtime behavior of searching for those annotations, we need a way to specify multiple init and destroy method names. There might be an impact on isExternallyManagedConfigMember in RootBeanDefinition as well.

Comment From: snicoll

Reviewing what we did in Spring Native to support this feature, it looks like that adding multiple init/destroy method names could be enough to support this use case, if we'd honor MergedBeanDefinitionPostProcessor.

The current code registers detected method as externally managed. We could rather "just" register it and let the new code invokes the method.