code: public void registerPrototype(String name, Class<?> clazz) throws BeansException {
          GenericBeanDefinition bd = new GenericBeanDefinition();
          bd.setScope(GenericBeanDefinition.SCOPE_PROTOTYPE);
          bd.setBeanClass(clazz);
          getDefaultListableBeanFactory().registerBeanDefinition(name, bd);
      }
docs: Register a prototype bean with the underlying bean factory.
  <p>For more advanced needs, register with the underlying BeanFactory directly.
  @see #getDefaultListableBeanFactory