# Package org.springframework.context

@NonNullApi @NonNullFields package org.springframework.context
This package builds on the beans package to add support for message sources and for the Observer design pattern, and the ability for application objects to obtain resources using a consistent API.

There is no necessity for Spring applications to depend on ApplicationContext or even BeanFactory functionality explicitly. One of the strengths of the Spring architecture is that application objects can often be configured without any dependency on Spring-specific APIs.

Related Packages
Package
Description
org.springframework.context.annotation
Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.
org.springframework.context.aot
AOT support for application contexts.
org.springframework.context.config
Support package for advanced application context configuration, with XML schema being the primary configuration format.
org.springframework.context.event
Support classes for application events, like standard context events.
org.springframework.context.expression
Expression parsing support within a Spring application context.
org.springframework.context.i18n
Abstraction for determining the current Locale, plus global holder that exposes a thread-bound Locale.
org.springframework.context.index
Support package for reading and managing the components index.
org.springframework.context.support
Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.
org.springframework.context.weaving
Load-time weaving support for a Spring application context, building on Spring's `LoadTimeWeaver` abstraction.
Class
Description
ApplicationContext
Central interface to provide configuration for an application.
ApplicationContextAware
Interface to be implemented by any object that wishes to be notified of the `ApplicationContext` that it runs in.
ApplicationContextException
Exception thrown during application context initialization.
ApplicationContextInitializer<C extends ConfigurableApplicationContext>
Callback interface for initializing a Spring `ConfigurableApplicationContext` prior to being refreshed.
ApplicationEvent
Class to be extended by all application events.
ApplicationEventPublisher
Interface that encapsulates event publication functionality.
ApplicationEventPublisherAware
Interface to be implemented by any object that wishes to be notified of the ApplicationEventPublisher (typically the ApplicationContext) that it runs in.
ApplicationListener<E extends ApplicationEvent>
Interface to be implemented by application event listeners.
ApplicationStartupAware
Interface to be implemented by any object that wishes to be notified of the `ApplicationStartup` that it runs with.
ConfigurableApplicationContext
SPI interface to be implemented by most if not all application contexts.
EmbeddedValueResolverAware
Interface to be implemented by any object that wishes to be notified of a `StringValueResolver` for the resolution of embedded definition values.
EnvironmentAware
Interface to be implemented by any bean that wishes to be notified of the `Environment` that it runs in.
HierarchicalMessageSource
Sub-interface of MessageSource to be implemented by objects that can resolve messages hierarchically.
Lifecycle
A common interface defining methods for start/stop lifecycle control.
LifecycleProcessor
Strategy interface for processing Lifecycle beans within the ApplicationContext.
MessageSource
Strategy interface for resolving messages, with support for the parameterization and internationalization of such messages.
MessageSourceAware
Interface to be implemented by any object that wishes to be notified of the `MessageSource` (typically the ApplicationContext) that it runs in.
MessageSourceResolvable
Interface for objects that are suitable for message resolution in a `MessageSource`.
NoSuchMessageException
Exception thrown when a message can't be resolved.
PayloadApplicationEvent<T>
An `ApplicationEvent` that carries an arbitrary payload.
Phased
Interface for objects that may participate in a phased process such as lifecycle management.
ResourceLoaderAware
Interface to be implemented by any object that wishes to be notified of the `ResourceLoader` (typically the ApplicationContext) that it runs in.
SmartLifecycle
An extension of the `Lifecycle` interface for those objects that require to be started upon `ApplicationContext` refresh and/or shutdown in a particular order.