Class SpringContext

java.lang.Object
es.kukenan.smartfi.context.SpringContext
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class SpringContext extends Object implements org.springframework.context.ApplicationContextAware
Component to obtain the spring application context for classes without spring context.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static org.springframework.context.ApplicationContext
    Spring application context bean.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.springframework.context.ApplicationContext
    Get Spring application context.
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
    Set Spring application context for this application.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • context

      @Autowired private static org.springframework.context.ApplicationContext context
      Spring application context bean.
  • Constructor Details

    • SpringContext

      public SpringContext()
  • Method Details

    • getApplicationContext

      public static org.springframework.context.ApplicationContext getApplicationContext()
      Get Spring application context.
      Returns:
      Spring application context for this application.
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Set Spring application context for this application.
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Parameters:
      applicationContext - Spring app context.
      Throws:
      org.springframework.beans.BeansException - if is not able to find the bean.