Uses of Interface
org.springframework.context.MessageSource
Package
Description
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.
Annotation support for the Application Context, including JSR-250 "common"
annotations, component-scanning, and Java-based metadata for creating
Spring-managed objects.
Classes supporting the org.springframework.context package,
such as abstract base classes for ApplicationContext
implementations and a MessageSource implementation.
Contains classes defining the application context subinterface
for UI applications.
Classes supporting the org.springframework.ui.context package.
Support classes for integrating a JSR-303 Bean Validation provider
(such as Hibernate Validator) into a Spring ApplicationContext
and in particular with Spring's data binding and validation APIs.
Common, generic interfaces that define minimal boundary points
between Spring's web infrastructure and other framework modules.
Provides web-specific data binding functionality.
Support classes for web data binding.
Contains a variant of the application context interface for web applications,
and the ContextLoaderListener that bootstraps a root web application context.
Classes supporting the
org.springframework.web.context
package,
such as WebApplicationContext implementations and various utility classes.Common infrastructure for handler method processing, as used by
Spring MVC's
org.springframework.web.servlet.mvc.method
package.Support classes for annotation-based handler method processing.
Generic support classes for handler method processing.
Infrastructure for annotation-based handler method processing.
Support for result handling through view resolution.
Core interfaces and classes for Spring's generic, reactive web support.
Support package for annotation-based Servlet MVC controllers.
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation
package.Support classes for Spring's web MVC framework.
This package contains Spring's JSP standard tag library for JSP 2.0+.
Provides standard View and ViewResolver implementations,
including abstract base classes for custom implementations.
Miscellaneous web utility classes, such as HTML escaping and cookie handling.
-
Uses of MessageSource in org.springframework.context
Modifier and TypeInterfaceDescriptioninterface
Central interface to provide configuration for an application.interface
SPI interface to be implemented by most if not all application contexts.interface
Sub-interface of MessageSource to be implemented by objects that can resolve messages hierarchically.Modifier and TypeMethodDescriptionHierarchicalMessageSource.getParentMessageSource()
Return the parent of this MessageSource, ornull
if none.Modifier and TypeMethodDescriptionvoid
MessageSourceAware.setMessageSource
(MessageSource messageSource) Set theMessageSource
that this object runs in.void
HierarchicalMessageSource.setParentMessageSource
(MessageSource parent) Set the parent that will be used to try to resolve messages that this object can't resolve. -
Uses of MessageSource in org.springframework.context.annotation
Modifier and TypeClassDescriptionclass
Standalone application context, accepting component classes as input — in particular@Configuration
-annotated classes, but also plain@Component
types and JSR-330 compliant classes usingjakarta.inject
annotations. -
Uses of MessageSource in org.springframework.context.support
Modifier and TypeClassDescriptionclass
Abstract implementation of theApplicationContext
interface.class
Abstract implementation of theHierarchicalMessageSource
interface, implementing common handling of message variants, making it easy to implement a specific strategy for a concrete MessageSource.class
Base class forApplicationContext
implementations which are supposed to support multiple calls toAbstractApplicationContext.refresh()
, creating a new internal bean factory instance every time.class
AbstractRefreshableApplicationContext
subclass that adds common handling of specified config locations.class
Abstract base class forMessageSource
implementations based on resource bundle conventions, such asResourceBundleMessageSource
andReloadableResourceBundleMessageSource
.class
Convenient base class forApplicationContext
implementations, drawing configuration from XML documents containing bean definitions understood by anXmlBeanDefinitionReader
.class
Standalone XML application context, taking the context definition files from the class path, interpreting plain paths as class path resource names that include the package path (e.g.class
EmptyMessageSource
that delegates all calls to the parent MessageSource.class
Standalone XML application context, taking the context definition files from the file system or from URLs, interpreting plain paths as relative file system locations (e.g.class
Generic ApplicationContext implementation that holds a single internalDefaultListableBeanFactory
instance and does not assume a specific bean definition format.class
AnApplicationContext
implementation that extendsGenericApplicationContext
and implementsGroovyObject
such that beans can be retrieved with the dot de-reference syntax instead of usingAbstractApplicationContext.getBean(java.lang.String)
.class
Convenient application context with built-in XML support.class
Spring-specificMessageSource
implementation that accesses resource bundles using specified basenames, participating in the SpringApplicationContext
's resource loading.class
MessageSource
implementation that accesses resource bundles using specified basenames.class
ApplicationContext
implementation which supports programmatic registration of beans and messages, rather than reading bean definitions from external configuration sources.class
Simple implementation ofMessageSource
which allows messages to be registered programmatically.Modifier and TypeMethodDescriptionprotected MessageSource
AbstractApplicationContext.getInternalParentMessageSource()
Return the internal message source of the parent context if it is an AbstractApplicationContext too; else, return the parent context itself.AbstractMessageSource.getParentMessageSource()
DelegatingMessageSource.getParentMessageSource()
Modifier and TypeMethodDescriptionvoid
AbstractMessageSource.setParentMessageSource
(MessageSource parent) void
DelegatingMessageSource.setParentMessageSource
(MessageSource parent) ModifierConstructorDescriptionMessageSourceAccessor
(MessageSource messageSource) Create a new MessageSourceAccessor, using LocaleContextHolder's locale as default locale.MessageSourceAccessor
(MessageSource messageSource, Locale defaultLocale) Create a new MessageSourceAccessor, using the given default locale.MessageSourceResourceBundle
(MessageSource source, Locale locale) Create a new MessageSourceResourceBundle for the given MessageSource and Locale.MessageSourceResourceBundle
(MessageSource source, Locale locale, ResourceBundle parent) Create a new MessageSourceResourceBundle for the given MessageSource and Locale. -
Uses of MessageSource in org.springframework.ui.context
Modifier and TypeMethodDescriptionTheme.getMessageSource()
Deprecated.Return the specific MessageSource that resolves messages with respect to this theme. -
Uses of MessageSource in org.springframework.ui.context.support
Modifier and TypeMethodDescriptionprotected MessageSource
ResourceBundleThemeSource.createMessageSource
(String basename) Deprecated.Create a MessageSource for the given basename, to be used as MessageSource for the corresponding theme.final MessageSource
SimpleTheme.getMessageSource()
Deprecated.ModifierConstructorDescriptionSimpleTheme
(String name, MessageSource messageSource) Deprecated.Create a SimpleTheme. -
Uses of MessageSource in org.springframework.validation.beanvalidation
Modifier and TypeMethodDescriptionvoid
LocalValidatorFactoryBean.setValidationMessageSource
(MessageSource messageSource) Specify a custom Spring MessageSource for resolving validation messages, instead of relying on JSR-303's default "ValidationMessages.properties" bundle in the classpath.ModifierConstructorDescriptionMessageSourceResourceBundleLocator
(MessageSource messageSource) Build a MessageSourceResourceBundleLocator for the given MessageSource. -
Uses of MessageSource in org.springframework.web
Modifier and TypeMethodDescriptiondefault ErrorResponse
ErrorResponse.Builder.build
(MessageSource messageSource, Locale locale) Build theErrorResponse
instance and also resolve the "detail" and "title" through the givenMessageSource
.default Object[]
ErrorResponse.getDetailMessageArguments
(MessageSource messageSource, Locale locale) Variant ofErrorResponse.getDetailMessageArguments()
that uses the givenMessageSource
for resolving the message argument values.default ProblemDetail
ErrorResponse.updateAndGetBody
(MessageSource messageSource, Locale locale) Use the givenMessageSource
to resolve thetype
,title
, anddetail
message codes, and then use the resolved values to update the corresponding fields inErrorResponse.getBody()
. -
Uses of MessageSource in org.springframework.web.bind
Modifier and TypeMethodDescriptionObject[]
MethodArgumentNotValidException.getDetailMessageArguments
(MessageSource source, Locale locale) -
Uses of MessageSource in org.springframework.web.bind.support
Modifier and TypeMethodDescriptionObject[]
WebExchangeBindException.getDetailMessageArguments
(MessageSource source, Locale locale) -
Uses of MessageSource in org.springframework.web.context
Modifier and TypeInterfaceDescriptioninterface
Interface to be implemented by configurable web application contexts.interface
Interface to provide configuration for a web application. -
Uses of MessageSource in org.springframework.web.context.support
Modifier and TypeClassDescriptionclass
AbstractRefreshableApplicationContext
subclass which implements theConfigurableWebApplicationContext
interface for web environments.class
WebApplicationContext
implementation which accepts component classes as input — in particular@Configuration
classes, but also plain@Component
classes as well as JSR-330 compliant classes usingjakarta.inject
annotations.class
Subclass ofGenericApplicationContext
, suitable for web environments.class
WebApplicationContext
implementation which takes its configuration from Groovy bean definition scripts and/or XML files, as understood by aGroovyBeanDefinitionReader
.class
StaticWebApplicationContext
implementation for testing.class
WebApplicationContext
implementation which takes its configuration from XML documents, understood by anXmlBeanDefinitionReader
. -
Uses of MessageSource in org.springframework.web.method
ModifierConstructorDescriptionprotected
HandlerMethod
(Object bean, Method method, MessageSource messageSource) Variant ofHandlerMethod(Object, Method)
that also accepts aMessageSource
for use from subclasses.HandlerMethod
(String beanName, BeanFactory beanFactory, MessageSource messageSource, Method method) Variant ofHandlerMethod(String, BeanFactory, Method)
that also accepts aMessageSource
. -
Uses of MessageSource in org.springframework.web.method.annotation
Modifier and TypeMethodDescriptionObject[]
HandlerMethodValidationException.getDetailMessageArguments
(MessageSource messageSource, Locale locale) -
Uses of MessageSource in org.springframework.web.method.support
ModifierConstructorDescriptionprotected
InvocableHandlerMethod
(Object bean, Method method, MessageSource messageSource) Variant ofInvocableHandlerMethod(Object, Method)
that also accepts aMessageSource
, for use in subclasses. -
Uses of MessageSource in org.springframework.web.reactive.result.method.annotation
Modifier and TypeMethodDescriptionprotected MessageSource
ResponseEntityExceptionHandler.getMessageSource()
Get theMessageSource
that this exception handler uses.Modifier and TypeMethodDescriptionvoid
ResponseEntityExceptionHandler.setMessageSource
(MessageSource messageSource) -
Uses of MessageSource in org.springframework.web.reactive.result.view
Modifier and TypeMethodDescriptionRequestContext.getMessageSource()
Return the MessageSource in use with this request.ModifierConstructorDescriptionRequestContext
(ServerWebExchange exchange, Map<String, Object> model, MessageSource messageSource) RequestContext
(ServerWebExchange exchange, Map<String, Object> model, MessageSource messageSource, RequestDataValueProcessor dataValueProcessor) -
Uses of MessageSource in org.springframework.web.server
Modifier and TypeMethodDescriptionResponseStatusException.updateAndGetBody
(MessageSource messageSource, Locale locale) -
Uses of MessageSource in org.springframework.web.servlet.mvc.annotation
Modifier and TypeMethodDescriptionvoid
ResponseStatusExceptionResolver.setMessageSource
(MessageSource messageSource) -
Uses of MessageSource in org.springframework.web.servlet.mvc.method.annotation
Modifier and TypeMethodDescriptionprotected MessageSource
ResponseEntityExceptionHandler.getMessageSource()
Get theMessageSource
that this exception handler uses.Modifier and TypeMethodDescriptionvoid
ResponseEntityExceptionHandler.setMessageSource
(MessageSource messageSource) ModifierConstructorDescriptionServletInvocableHandlerMethod
(Object handler, Method method, MessageSource messageSource) Variant ofServletInvocableHandlerMethod(Object, Method)
that also accepts aMessageSource
, e.g. -
Uses of MessageSource in org.springframework.web.servlet.support
Modifier and TypeMethodDescriptionstatic MessageSource
JstlUtils.getJstlAwareMessageSource
(ServletContext servletContext, MessageSource messageSource) Checks JSTL's "jakarta.servlet.jsp.jstl.fmt.localizationContext" context-param and creates a corresponding child message source, with the provided Spring-defined MessageSource as parent.RequestContext.getMessageSource()
Return the MessageSource to use (typically the current WebApplicationContext).Modifier and TypeMethodDescriptionstatic void
JstlUtils.exposeLocalizationContext
(HttpServletRequest request, MessageSource messageSource) Exposes JSTL-specific request attributes specifying locale and resource bundle for JSTL's formatting and message tags, using Spring's locale and MessageSource.static MessageSource
JstlUtils.getJstlAwareMessageSource
(ServletContext servletContext, MessageSource messageSource) Checks JSTL's "jakarta.servlet.jsp.jstl.fmt.localizationContext" context-param and creates a corresponding child message source, with the provided Spring-defined MessageSource as parent. -
Uses of MessageSource in org.springframework.web.servlet.tags
Modifier and TypeMethodDescriptionprotected MessageSource
MessageTag.getMessageSource()
Use the current RequestContext's application context as MessageSource.protected MessageSource
ThemeTag.getMessageSource()
Deprecated.Use the theme MessageSource for theme message resolution. -
Uses of MessageSource in org.springframework.web.servlet.view
ModifierConstructorDescriptionJstlView
(String url, MessageSource messageSource) Create a new JstlView with the given URL. -
Uses of MessageSource in org.springframework.web.util
Modifier and TypeMethodDescriptionstatic <E extends MessageSourceResolvable>
Map<E,String> BindErrorUtils.resolve
(List<E> errors, MessageSource messageSource, Locale locale) Resolve all errors through the givenMessageSource
.static String
BindErrorUtils.resolveAndJoin
(CharSequence delimiter, CharSequence prefix, CharSequence suffix, List<? extends MessageSourceResolvable> errors, MessageSource messageSource, Locale locale) Resolve all errors through the givenMessageSource
and join them.static String
BindErrorUtils.resolveAndJoin
(List<? extends MessageSourceResolvable> errors, MessageSource messageSource, Locale locale) Shortcut forBindErrorUtils.resolveAndJoin(CharSequence, CharSequence, CharSequence, List, MessageSource, Locale)
with", and "
as delimiter, and an empty prefix and suffix.