code: public static <T> T getBean(Class<T> clazz) {
          ApplicationContext appContext = getAppContext();
          
          try {
              return appContext == null ? null : appContext.getBean(clazz);
          } catch (Exception e) {
              return null;
          }
      }
docs: Return the bean of the specified class.
  
  @param <T> The requested class.
  @param clazz The bean class.
  @return The requested bean instance, or null if not found.