Class ApplicationContextHolder

java.lang.Object
org.broadleafcommerce.common.util.ApplicationContextHolder
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Component("blApplicationContextHolder") public class ApplicationContextHolder extends Object implements org.springframework.context.ApplicationContextAware
Convenient class to hold the Spring application context. Note that this holds the root application context as opposed to an individual servlet context.
Author:
Phillip Verheyden (phillipuniverse)
  • Field Details

    • context

      protected static org.springframework.context.ApplicationContext context
  • Constructor Details

    • ApplicationContextHolder

      public ApplicationContextHolder()
  • Method Details

    • getApplicationContext

      public static org.springframework.context.ApplicationContext getApplicationContext()
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • resetApplicationContext

      public static void resetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      see org.broadleafcommerce.test.TestNGSiteIntegrationSetup#reSetApplicationContext()
      Parameters:
      applicationContext -