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.
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.
-
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(@Nullable 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 (for example, "mypackage/myresource.txt").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 (for example, "mydir/myfile.txt").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(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 @Nullable 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(@Nullable MessageSource parent) voidDelegatingMessageSource.setParentMessageSource(@Nullable 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.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.