docs: public static <T> T registerBeanIntoApplicationContext(final ConfigurableApplicationContext applicationContext,
                                                             final T beanInstance, final String beanId) {
          val beanFactory = applicationContext.getBeanFactory();
          if (beanFactory.containsBean(beanId)) {
              return (T) applicationContext.getBean(beanId, beanInstance.getClass());
          }
          beanFactory.initializeBean(beanInstance, beanId);
          beanFactory.autowireBean(beanInstance);
          beanFactory.registerSingleton(beanId, beanInstance);
          return beanInstance;
      }