Class SpringUtil


  • public class SpringUtil
    extends java.lang.Object
    SpringUtil, a Spring utility.

    Applicable to Spring Framework version 2.x or later

    Author:
    henrichen
    • Constructor Summary

      Constructors 
      Constructor Description
      SpringUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.springframework.context.ApplicationContext getApplicationContext()
      Get the spring application context.
      static java.lang.Object getBean​(java.lang.String name)
      Get the spring bean by the specified name.
      static java.lang.Object getBean​(java.lang.String name, java.lang.Class cls)
      Get the spring bean by the specified name and class.
      • Methods inherited from class java.lang.Object

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

      • SpringUtil

        public SpringUtil()
    • Method Detail

      • getApplicationContext

        public static org.springframework.context.ApplicationContext getApplicationContext()
        Get the spring application context.
      • getBean

        public static java.lang.Object getBean​(java.lang.String name)
        Get the spring bean by the specified name.
      • getBean

        public static java.lang.Object getBean​(java.lang.String name,
                                               java.lang.Class cls)
        Get the spring bean by the specified name and class.