code: public static Object getSpringBean(ApplicationContext appContext, String id) {
          try {
              Object bean = appContext.getBean(id);
              return bean;
          } catch (BeansException e) {
              return null;
          }
      }
docs: Gets a bean by its id.
  
  @param appContext
  @param name
  @return