Class ApplicationContextAccessor
java.lang.Object
org.craftercms.commons.spring.context.ApplicationContextAccessor
org.craftercms.engine.util.spring.ApplicationContextAccessor
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class ApplicationContextAccessor
extends org.craftercms.commons.spring.context.ApplicationContextAccessor
Bean that provide simple access to the Spring application context's beans: first it uses the site's own context.
If not specified, it uses the default context. Used for example to access Spring beans from an FTL or a Groovy
script.
- Author:
- Alfonso Vásquez
-
Constructor Summary
ConstructorDescriptionApplicationContextAccessor
(org.springframework.context.ApplicationContext actualApplicationContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.context.ApplicationContext
Methods inherited from class org.craftercms.commons.spring.context.ApplicationContextAccessor
get, get, setApplicationContext
-
Constructor Details
-
ApplicationContextAccessor
public ApplicationContextAccessor() -
ApplicationContextAccessor
public ApplicationContextAccessor(org.springframework.context.ApplicationContext actualApplicationContext)
-
-
Method Details
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()- Overrides:
getApplicationContext
in classorg.craftercms.commons.spring.context.ApplicationContextAccessor
-