Class SpringUtils


  • public class SpringUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SpringUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T getBeanOfType​(org.springframework.context.ApplicationContext applicationContext, java.lang.Class<T> aClass)
      Search recursively in current and parent applicationContext's for Bean of Type T
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringUtils

        public SpringUtils()
    • Method Detail

      • getBeanOfType

        public static <T> T getBeanOfType​(org.springframework.context.ApplicationContext applicationContext,
                                          java.lang.Class<T> aClass)
        Search recursively in current and parent applicationContext's for Bean of Type T
        Type Parameters:
        T - Type of bean to search
        Parameters:
        applicationContext - Spring application context to start searching from
        aClass - Class type of bean to search
        Returns:
        first matched bean found