Class ApplicationBeans

java.lang.Object
de.hybris.platform.dataimportcommons.ApplicationBeans

public final class ApplicationBeans extends Object
A utility for retrieving Spring beans defined in the application context.
  • Method Details

    • getBean

      public static <T> T getBean(String id, Class<T> type)
      Retrieves a bean defined in the application context
      Type Parameters:
      T - expected type of Spring bean in the application context
      Parameters:
      id - ID or name of the Spring in the application context
      type - expected type of Spring bean in the application context
      Returns:
      bean instance defined in the Spring application context.
      Throws:
      org.springframework.beans.factory.NoSuchBeanDefinitionException - if the bean of the specified type and ID does not exist.