Uses of Interface
org.springframework.context.MessageSource
Packages that use 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.Generic support classes for handler method processing.
Infrastructure for annotation-based handler method processing.
Support for result handling through view resolution.
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.
-
Uses of MessageSource in org.springframework.context
Subinterfaces of MessageSource in org.springframework.contextModifier and TypeInterfaceDescriptioninterfaceCentral interface to provide configuration for an application.interfaceSPI interface to be implemented by most if not all application contexts.interfaceSub-interface of MessageSource to be implemented by objects that can resolve messages hierarchically.Methods in org.springframework.context that return MessageSourceModifier and TypeMethodDescriptionHierarchicalMessageSource.getParentMessageSource()Return the parent of this MessageSource, ornullif none.Methods in org.springframework.context with parameters of type MessageSourceModifier and TypeMethodDescriptionvoidMessageSourceAware.setMessageSource(MessageSource messageSource) Set theMessageSourcethat this object runs in.voidHierarchicalMessageSource.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
Classes in org.springframework.context.annotation that implement MessageSourceModifier and TypeClassDescriptionclassStandalone application context, accepting component classes as input — in particular@Configuration-annotated classes, but also plain@Componenttypes and JSR-330 compliant classes usingjakarta.injectannotations. -
Uses of MessageSource in org.springframework.context.support
Classes in org.springframework.context.support that implement MessageSourceModifier and TypeClassDescriptionclassAbstract implementation of theApplicationContextinterface.classAbstract implementation of theHierarchicalMessageSourceinterface, implementing common handling of message variants, making it easy to implement a specific strategy for a concrete MessageSource.classBase class forApplicationContextimplementations which are supposed to support multiple calls toAbstractApplicationContext.refresh(), creating a new internal bean factory instance every time.classAbstractRefreshableApplicationContextsubclass that adds common handling of specified config locations.classAbstract base class forMessageSourceimplementations based on resource bundle conventions, such asResourceBundleMessageSourceandReloadableResourceBundleMessageSource.classConvenient base class forApplicationContextimplementations, drawing configuration from XML documents containing bean definitions understood by anXmlBeanDefinitionReader.classStandalone 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.classEmptyMessageSourcethat delegates all calls to the parent MessageSource.classStandalone 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.classGeneric ApplicationContext implementation that holds a single internalDefaultListableBeanFactoryinstance and does not assume a specific bean definition format.classAnApplicationContextimplementation that extendsGenericApplicationContextand implementsGroovyObjectsuch that beans can be retrieved with the dot de-reference syntax instead of usingAbstractApplicationContext.getBean(java.lang.String).classConvenient application context with built-in XML support.classSpring-specificMessageSourceimplementation that accesses resource bundles using specified basenames, participating in the SpringApplicationContext's resource loading.classMessageSourceimplementation that accesses resource bundles using specified basenames.classApplicationContextimplementation which supports programmatic registration of beans and messages, rather than reading bean definitions from external configuration sources.classSimple implementation ofMessageSourcewhich allows messages to be registered programmatically.Methods in org.springframework.context.support that return MessageSourceModifier and TypeMethodDescriptionprotected MessageSourceAbstractApplicationContext.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()Methods in org.springframework.context.support with parameters of type MessageSourceModifier and TypeMethodDescriptionvoidAbstractMessageSource.setParentMessageSource(MessageSource parent) voidDelegatingMessageSource.setParentMessageSource(MessageSource parent) Constructors in org.springframework.context.support with parameters of type MessageSourceModifierConstructorDescriptionMessageSourceAccessor(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
Methods in org.springframework.ui.context that return MessageSourceModifier 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
Methods in org.springframework.ui.context.support that return MessageSourceModifier and TypeMethodDescriptionprotected MessageSourceResourceBundleThemeSource.createMessageSource(String basename) Deprecated.Create a MessageSource for the given basename, to be used as MessageSource for the corresponding theme.final MessageSourceSimpleTheme.getMessageSource()Deprecated.Constructors in org.springframework.ui.context.support with parameters of type MessageSourceModifierConstructorDescriptionSimpleTheme(String name, MessageSource messageSource) Deprecated.Create a SimpleTheme. -
Uses of MessageSource in org.springframework.validation.beanvalidation
Methods in org.springframework.validation.beanvalidation with parameters of type MessageSourceModifier and TypeMethodDescriptionvoidLocalValidatorFactoryBean.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.Constructors in org.springframework.validation.beanvalidation with parameters of type MessageSourceModifierConstructorDescriptionMessageSourceResourceBundleLocator(MessageSource messageSource) Build a MessageSourceResourceBundleLocator for the given MessageSource. -
Uses of MessageSource in org.springframework.web
Methods in org.springframework.web with parameters of type MessageSourceModifier and TypeMethodDescriptiondefault ErrorResponseErrorResponse.Builder.build(MessageSource messageSource, Locale locale) Build theErrorResponseinstance and also resolve the "detail" and "title" through the givenMessageSource.default Object[]ErrorResponse.getDetailMessageArguments(MessageSource messageSource, Locale locale) Variant ofErrorResponse.getDetailMessageArguments()that uses the givenMessageSourcefor resolving the message argument values.default ProblemDetailErrorResponse.updateAndGetBody(MessageSource messageSource, Locale locale) Resolve thedetailMessageCodeand thetitleMessageCodethrough the givenMessageSource, and if found, update the "detail" and "title" fields respectively. -
Uses of MessageSource in org.springframework.web.bind
Methods in org.springframework.web.bind with parameters of type MessageSourceModifier and TypeMethodDescriptionMethodArgumentNotValidException.errorsToStringList(List<? extends ObjectError> errors, MessageSource source, Locale locale) Variant ofMethodArgumentNotValidException.errorsToStringList(List)that uses aMessageSourceto resolve the message code of the error, or fall back on the error's default message.Object[]MethodArgumentNotValidException.getDetailMessageArguments(MessageSource messageSource, Locale locale) MethodArgumentNotValidException.resolveErrorMessages(MessageSource messageSource, Locale locale) Resolve global and field errors to messages with the givenMessageSourceandLocale. -
Uses of MessageSource in org.springframework.web.bind.support
Methods in org.springframework.web.bind.support with parameters of type MessageSourceModifier and TypeMethodDescriptionObject[]WebExchangeBindException.getDetailMessageArguments(MessageSource source, Locale locale) WebExchangeBindException.resolveErrorMessages(MessageSource messageSource, Locale locale) Resolve global and field errors to messages with the givenMessageSourceandLocale. -
Uses of MessageSource in org.springframework.web.context
Subinterfaces of MessageSource in org.springframework.web.contextModifier and TypeInterfaceDescriptioninterfaceInterface to be implemented by configurable web application contexts.interfaceInterface to provide configuration for a web application. -
Uses of MessageSource in org.springframework.web.context.support
Classes in org.springframework.web.context.support that implement MessageSourceModifier and TypeClassDescriptionclassAbstractRefreshableApplicationContextsubclass which implements theConfigurableWebApplicationContextinterface for web environments.classWebApplicationContextimplementation which accepts component classes as input — in particular@Configurationclasses, but also plain@Componentclasses as well as JSR-330 compliant classes usingjakarta.injectannotations.classSubclass ofGenericApplicationContext, suitable for web environments.classWebApplicationContextimplementation which takes its configuration from Groovy bean definition scripts and/or XML files, as understood by aGroovyBeanDefinitionReader.classStaticWebApplicationContextimplementation for testing.classWebApplicationContextimplementation which takes its configuration from XML documents, understood by anXmlBeanDefinitionReader. -
Uses of MessageSource in org.springframework.web.method
Constructors in org.springframework.web.method with parameters of type MessageSourceModifierConstructorDescriptionprotectedHandlerMethod(Object bean, Method method, MessageSource messageSource) Variant ofHandlerMethod(Object, Method)that also accepts aMessageSourcefor 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.support
Constructors in org.springframework.web.method.support with parameters of type MessageSourceModifierConstructorDescriptionprotectedInvocableHandlerMethod(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
Methods in org.springframework.web.reactive.result.method.annotation that return MessageSourceModifier and TypeMethodDescriptionprotected MessageSourceResponseEntityExceptionHandler.getMessageSource()Get theMessageSourcethat this exception handler uses.Methods in org.springframework.web.reactive.result.method.annotation with parameters of type MessageSourceModifier and TypeMethodDescriptionvoidResponseEntityExceptionHandler.setMessageSource(MessageSource messageSource) -
Uses of MessageSource in org.springframework.web.reactive.result.view
Methods in org.springframework.web.reactive.result.view that return MessageSourceModifier and TypeMethodDescriptionRequestContext.getMessageSource()Return the MessageSource in use with this request.Constructors in org.springframework.web.reactive.result.view with parameters of type MessageSourceModifierConstructorDescriptionRequestContext(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.servlet.mvc.annotation
Methods in org.springframework.web.servlet.mvc.annotation with parameters of type MessageSourceModifier and TypeMethodDescriptionvoidResponseStatusExceptionResolver.setMessageSource(MessageSource messageSource) -
Uses of MessageSource in org.springframework.web.servlet.mvc.method.annotation
Methods in org.springframework.web.servlet.mvc.method.annotation that return MessageSourceModifier and TypeMethodDescriptionprotected MessageSourceResponseEntityExceptionHandler.getMessageSource()Get theMessageSourcethat this exception handler uses.Methods in org.springframework.web.servlet.mvc.method.annotation with parameters of type MessageSourceModifier and TypeMethodDescriptionvoidResponseEntityExceptionHandler.setMessageSource(MessageSource messageSource) Constructors in org.springframework.web.servlet.mvc.method.annotation with parameters of type MessageSourceModifierConstructorDescriptionServletInvocableHandlerMethod(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
Methods in org.springframework.web.servlet.support that return MessageSourceModifier and TypeMethodDescriptionstatic MessageSourceJstlUtils.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.final MessageSourceRequestContext.getMessageSource()Return the current WebApplicationContext as MessageSource.Methods in org.springframework.web.servlet.support with parameters of type MessageSourceModifier and TypeMethodDescriptionstatic voidJstlUtils.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 MessageSourceJstlUtils.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
Methods in org.springframework.web.servlet.tags that return MessageSourceModifier and TypeMethodDescriptionprotected MessageSourceMessageTag.getMessageSource()Use the current RequestContext's application context as MessageSource.protected MessageSourceThemeTag.getMessageSource()Deprecated.Use the theme MessageSource for theme message resolution. -
Uses of MessageSource in org.springframework.web.servlet.view
Constructors in org.springframework.web.servlet.view with parameters of type MessageSourceModifierConstructorDescriptionJstlView(String url, MessageSource messageSource) Create a new JstlView with the given URL.