public class ApplicationContext
extends org.springframework.web.context.support.XmlWebApplicationContext
XmlWebApplicationContext
representing a SiteApplication
.Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_CLASSPATH |
DEFAULT_CONFIG_LOCATION, DEFAULT_CONFIG_LOCATION_PREFIX, DEFAULT_CONFIG_LOCATION_SUFFIX
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAME
APPLICATION_CONTEXT_ID_PREFIX, SERVLET_CONFIG_BEAN_NAME
CONTEXT_ATTRIBUTES_BEAN_NAME, CONTEXT_PARAMETERS_BEAN_NAME, ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, SCOPE_APPLICATION, SCOPE_GLOBAL_SESSION, SCOPE_REQUEST, SCOPE_SESSION, SERVLET_CONTEXT_BEAN_NAME
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME
Constructor and Description |
---|
ApplicationContext(SiteApplication siteApplication,
org.springframework.context.ApplicationContext parent,
ClassLoader classLoader,
javax.servlet.ServletContext sc,
String[] configLocations)
Creates a new
ApplicationContext . |
Modifier and Type | Method and Description |
---|---|
<T> T |
getBean(Class<T> requiredType)
Tries to retrieve the bean of the required type, returning
null instead of throwing a
BeansException if such a bean does not exist. |
Site |
getSite()
Returns the
Site this context belongs to, only available if this context belongs to a core-
Application . |
getDefaultConfigLocations, initBeanDefinitionReader, loadBeanDefinitions, loadBeanDefinitions
createEnvironment, getApplicationName, getConfigLocations, getNamespace, getResourceByPath, getResourcePatternResolver, getServletConfig, getServletContext, getTheme, initPropertySources, onRefresh, postProcessBeanFactory, setNamespace, setServletConfig, setServletContext
afterPropertiesSet, resolvePath, setBeanName, setConfigLocation, setConfigLocations, setId
assertBeanFactoryActive, cancelRefresh, closeBeanFactory, createBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferences
addApplicationListener, addBeanFactoryPostProcessor, close, containsBean, containsBeanDefinition, containsLocalBean, destroy, destroyBeans, doClose, findAnnotationOnBean, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getDisplayName, getEnvironment, getId, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResources, getStartupDate, getType, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, resetCommonCaches, setDisplayName, setEnvironment, setParent, start, stop, toString
addProtocolResolver, getClassLoader, getProtocolResolvers, getResource, setClassLoader
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setConfigLocation, setConfigLocations
addApplicationListener, addBeanFactoryPostProcessor, addProtocolResolver, close, getBeanFactory, getEnvironment, isActive, refresh, registerShutdownHook, setEnvironment, setId, setParent
getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate
containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation
containsLocalBean, getParentBeanFactory
containsBean, getAliases, getBean, getBean, getBean, getBean, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatch
getMessage, getMessage, getMessage
publishEvent, publishEvent
getResources
public static final String CONTEXT_CLASSPATH
public ApplicationContext(SiteApplication siteApplication, org.springframework.context.ApplicationContext parent, ClassLoader classLoader, javax.servlet.ServletContext sc, String[] configLocations)
ApplicationContext
.siteApplication
- the SiteApplication
this ApplicationContext
representsparent
- the parent ApplicationContext
, set only if the SiteApplication
's Application
is a core Application
classLoader
- the ClassLoader
for this contextsc
- the ServletContext
for this contextconfigLocations
- the config locations for this contextpublic <T> T getBean(Class<T> requiredType) throws org.springframework.beans.BeansException
null
instead of throwing a
BeansException
if such a bean does not exist.getBean
in interface org.springframework.beans.factory.BeanFactory
getBean
in class org.springframework.context.support.AbstractApplicationContext
requiredType
- the type that the bean must matchnull
if no such bean existsorg.springframework.beans.BeansException
- - never thrown, instead null
is returnedpublic Site getSite()
Site
this context belongs to, only available if this context belongs to a core-
Application
.Site
Copyright © 2011–2019 aiticon GmbH. All rights reserved.