FormattingConversionService configured by default with
converters and formatters appropriate for most applications.
Designed for direct instantiation but also exposes the static addDefaultFormatters
utility method for ad hoc use against any FormatterRegistry instance, just
as DefaultConversionService exposes its own
addDefaultConverters method.
Automatically registers formatters for JSR-354 Money & Currency and JSR-310 Date-Time depending on the presence of the corresponding API on the classpath.
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean |
| Access | Constructor and Description |
|---|---|
| public | DefaultFormattingConversionService()
Create a new |
| public | DefaultFormattingConversionService(boolean
whether to register default formatters registerDefaultFormatters)Create a new |
| public | DefaultFormattingConversionService(StringValueResolver
delegated to embeddedValueResolver, boolean setEmbeddedValueResolver(StringValueResolver)
prior to calling addDefaultFormatters.whether to register default formatters registerDefaultFormatters)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| public static void | addDefaultFormatters(FormatterRegistry
the service to register default formatters with formatterRegistry)Add formatters appropriate for most environments: including number formatters, JSR-354 Money & Currency formatters, JSR-310 Date-Time and/or Joda-Time formatters, depending on the presence of the corresponding API on the classpath. |
| jsr354Present | back to summary |
|---|---|
| private static final boolean jsr354Present | |
| DefaultFormattingConversionService | back to summary |
|---|---|
| public DefaultFormattingConversionService() Create a new | |
| DefaultFormattingConversionService | back to summary |
|---|---|
| public DefaultFormattingConversionService(boolean registerDefaultFormatters) Create a new
| |
| DefaultFormattingConversionService | back to summary |
|---|---|
| public DefaultFormattingConversionService(StringValueResolver embeddedValueResolver, boolean registerDefaultFormatters) Create a new
| |
| addDefaultFormatters | back to summary |
|---|---|
| public static void addDefaultFormatters(FormatterRegistry formatterRegistry) Add formatters appropriate for most environments: including number formatters, JSR-354 Money & Currency formatters, JSR-310 Date-Time and/or Joda-Time formatters, depending on the presence of the corresponding API on the classpath.
| |