code: public static <T> T getBean(ApplicationContext appContext, String id, Class<T> clazz) {
          try {
              return appContext.getBean(id, clazz);
          } catch (BeansException e) {
              return null;
          }
      }
docs: Gets a bean by its id and class.
  
  @param appContext
  @param id
  @param clazz
  @return