code: public void registerBeans(BeanDefinitionRegistry registry) {
          finalizeDeferredProperties();
  
          if (registry instanceof GenericApplicationContext) {
              GenericApplicationContext ctx = (GenericApplicationContext) registry;
              ctx.setClassLoader(classLoader);
              ctx.getBeanFactory().setBeanClassLoader(classLoader);
          }
  
          springConfig.registerBeansWithRegistry(registry);
      }
docs: Register a set of beans with the given bean registry. Most
  application contexts are bean registries.