类 FormattingConversionServiceFactoryBean

java.lang.Object
cn.taketoday.format.support.FormattingConversionServiceFactoryBean
所有已实现的接口:
Aware, FactoryBean<FormattingConversionService>, InitializingBean, EmbeddedValueResolverAware

public class FormattingConversionServiceFactoryBean extends Object implements FactoryBean<FormattingConversionService>, EmbeddedValueResolverAware, InitializingBean
A factory providing convenient access to a FormattingConversionService configured with converters and formatters for common types such as numbers and datetimes.

Additional converters and formatters can be registered declaratively through setConverters(Set) and setFormatters(Set). Another option is to register converters and formatters in code by implementing the FormatterRegistrar interface. You can then configure provide the set of registrars to use through setFormatterRegistrars(Set).

A good example for registering converters and formatters in code is JodaTimeFormatterRegistrar, which registers a number of date-related formatters and converters. For a more detailed list of cases see setFormatterRegistrars(Set)

Like all FactoryBean implementations, this class is suitable for use when configuring a Framework application context using Framework <beans> XML. When configuring the container with @Configuration classes, simply instantiate, configure and return the appropriate FormattingConversionService object from a @Bean method.

从以下版本开始:
4.0
作者:
Keith Donald, Juergen Hoeller, Rossen Stoyanchev, Chris Beams, Harry Yang