接口的使用
cn.taketoday.context.MessageSource
使用MessageSource的程序包
程序包
说明
Provides data binding and validation functionality,
for usage in business and/or UI layers.
Support classes for integrating a JSR-303 Bean Validation provider
(such as Hibernate Validator) into a Framework ApplicationContext
and in particular with Framework's data binding and validation APIs.
-
cn.taketoday.context中MessageSource的使用
修饰符和类型接口说明interfaceCentral 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.修饰符和类型方法说明HierarchicalMessageSource.getParentMessageSource()Return the parent of this MessageSource, ornullif none.参数类型为MessageSource的cn.taketoday.context中的方法修饰符和类型方法说明voidMessageSourceAware.setMessageSource(MessageSource messageSource) Set the MessageSource that 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. -
cn.taketoday.context.annotation中MessageSource的使用
修饰符和类型类说明classStandalone application context, accepting component classes as input — in particular@Configuration-annotated classes, but also plain@Componenttypes and JSR-330 compliant classes usingjakarta.injectannotations. -
cn.taketoday.context.support中MessageSource的使用
修饰符和类型类说明classAbstract 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 internalStandardBeanFactoryinstance and does not assume a specific bean definition format.classConvenient application context with built-in XML support.classFramework-specificMessageSourceimplementation that accesses resource bundles using specified basenames, participating in the FrameworkApplicationContext's resource loading.classMessageSourceimplementation that accesses resource bundles using specified basenames.classStandardApplicationContextlike Spring's AnnotationConfigApplicationContextclassApplicationContextimplementation 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.修饰符和类型方法说明protected 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()修饰符和类型方法说明voidAbstractMessageSource.setParentMessageSource(MessageSource parent) voidDelegatingMessageSource.setParentMessageSource(MessageSource parent) 参数类型为MessageSource的cn.taketoday.context.support中的构造器限定符构造器说明MessageSourceAccessor(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. -
cn.taketoday.validation中MessageSource的使用
参数类型为MessageSource的cn.taketoday.validation中的构造器限定符构造器说明MessageInterpolatorFactory(MessageSource messageSource) Creates a newMessageInterpolatorFactorythat will produce aMessageInterpolatorthat uses the givenmessageSourceto resolve any message parameters before final interpolation. -
cn.taketoday.validation.beanvalidation中MessageSource的使用
修饰符和类型方法说明voidLocalValidatorFactoryBean.setValidationMessageSource(MessageSource messageSource) Specify a custom Framework MessageSource for resolving validation messages, instead of relying on JSR-303's default "ValidationMessages.properties" bundle in the classpath.限定符构造器说明MessageSourceResourceBundleLocator(MessageSource messageSource) Build a MessageSourceResourceBundleLocator for the given MessageSource.