for (String beanName : beanFactory.getBeanDefinitionNames()) {
BeanDefinition definition = beanFactory.getBeanDefinition(beanName);
// Replace this or any of its inner beans with scoped proxy if it has this scope
boolean scoped = PROCESS_SCOPE_NAME.equals(definition.getScope());
Scopifier scopifier = new Scopifier(registry, PROCESS_SCOPE_NAME, proxyTargetClass, scoped);
scopifier.visitBeanDefinition(definition);
if (scoped) {
Scopifier.createScopedProxy(beanName, definition, registry, proxyTargetClass);
}
}