Close

Spring Framework - Default Formatters and Converter list

[Last Updated: Nov 9, 2025]

Spring Framework 

This examples shows how to find out formatter and converters registered with a ConversionService by default. Spring version: 4.3.4

package com.logicbig.example;

import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.format.support.DefaultFormattingConversionService;
import org.springframework.format.support.FormattingConversionService;

public class DefaultFormatterListExample {
public static void main (String[] args) {

ConversionService service = new DefaultConversionService();
System.out.println("----- list for DefaultConversionService -----");
System.out.println(service);

service = new DefaultFormattingConversionService();
System.out.println("----- list for DefaultFormattingConversionService -----");
System.out.println(service);

service = new FormattingConversionService();
System.out.println("----- list for FormattingConversionService -----");
System.out.println(service);
}
}

Output

----- list for DefaultConversionService -----
ConversionService converters =
java.lang.Boolean -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@384c8818
java.lang.Character -> java.lang.Number : org.springframework.core.convert.support.CharacterToNumberFactory@11f99037
java.lang.Character -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@3d39d37e
java.lang.Enum -> java.lang.Integer : org.springframework.core.convert.support.EnumToIntegerConverter@520edb0c
java.lang.Enum -> java.lang.String : org.springframework.core.convert.support.EnumToStringConverter@532aa3c2
java.lang.Integer -> java.lang.Enum : org.springframework.core.convert.support.IntegerToEnumConverterFactory@7d6635d
java.lang.Number -> java.lang.Character : org.springframework.core.convert.support.NumberToCharacterConverter@6eb53c5a
java.lang.Number -> java.lang.Number : org.springframework.core.convert.support.NumberToNumberConverterFactory@1d8a49b3
java.lang.Number -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@6f5bf0bc
java.lang.String -> java.lang.Boolean : org.springframework.core.convert.support.StringToBooleanConverter@2cbf60ec
java.lang.String -> java.lang.Character : org.springframework.core.convert.support.StringToCharacterConverter@54b36474
java.lang.String -> java.lang.Enum : org.springframework.core.convert.support.StringToEnumConverterFactory@6646fca8
java.lang.String -> java.lang.Number : org.springframework.core.convert.support.StringToNumberConverterFactory@4219cd7c
java.lang.String -> java.nio.charset.Charset : org.springframework.core.convert.support.StringToCharsetConverter@3efe08b6
java.lang.String -> java.util.Currency : org.springframework.core.convert.support.StringToCurrencyConverter@604f95c9
java.lang.String -> java.util.Locale : org.springframework.core.convert.support.StringToLocaleConverter@7e20e431
java.lang.String -> java.util.Properties : org.springframework.core.convert.support.StringToPropertiesConverter@7b0da66c
java.lang.String -> java.util.TimeZone : org.springframework.core.convert.support.StringToTimeZoneConverter@20413bb5
java.lang.String -> java.util.UUID : org.springframework.core.convert.support.StringToUUIDConverter@21aeedb9
java.lang.String -> java.util.regex.Pattern : org.springframework.core.convert.support.StringToPatternConverter@5485f64d
java.nio.charset.Charset -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@9962efd
java.time.Instant -> java.util.Date : org.springframework.core.convert.support.InstantToDateConverter@34072c88
java.time.ZoneId -> java.util.TimeZone : org.springframework.core.convert.support.ZoneIdToTimeZoneConverter@370fe115
java.time.ZonedDateTime -> java.util.Calendar : org.springframework.core.convert.support.ZonedDateTimeToCalendarConverter@31485a08
java.util.Currency -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@45aa271
java.util.Date -> java.time.Instant : org.springframework.core.convert.support.DateToInstantConverter@a179eb3
java.util.Locale -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@7ef71d47
java.util.Properties -> java.lang.String : org.springframework.core.convert.support.PropertiesToStringConverter@2a7fbc37
java.util.UUID -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@42e05981
java.util.regex.Pattern -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@73e3a48e
org.springframework.core.convert.support.ArrayToArrayConverter@5390c783
org.springframework.core.convert.support.ArrayToCollectionConverter@6d6f0a2c
org.springframework.core.convert.support.ArrayToObjectConverter@609aefc
org.springframework.core.convert.support.ArrayToStringConverter@3485af6f
org.springframework.core.convert.support.ByteBufferConverter@22fbc38a
org.springframework.core.convert.support.ByteBufferConverter@22fbc38a
org.springframework.core.convert.support.ByteBufferConverter@22fbc38a
org.springframework.core.convert.support.ByteBufferConverter@22fbc38a
org.springframework.core.convert.support.CollectionToArrayConverter@1760b663
org.springframework.core.convert.support.CollectionToCollectionConverter@20fa0dfb
org.springframework.core.convert.support.CollectionToObjectConverter@185d8acc
org.springframework.core.convert.support.CollectionToStringConverter@2f3d49c1
org.springframework.core.convert.support.FallbackObjectToStringConverter@7928a078
org.springframework.core.convert.support.IdToEntityConverter@61a5f49a,org.springframework.core.convert.support.ObjectToObjectConverter@514b3602
org.springframework.core.convert.support.MapToMapConverter@8632128
org.springframework.core.convert.support.ObjectToArrayConverter@46163ae4
org.springframework.core.convert.support.ObjectToCollectionConverter@65442944
org.springframework.core.convert.support.ObjectToOptionalConverter@4122bf43
org.springframework.core.convert.support.ObjectToOptionalConverter@4122bf43
org.springframework.core.convert.support.ObjectToOptionalConverter@4122bf43
org.springframework.core.convert.support.OptionalToObjectConverter@76e763bf
org.springframework.core.convert.support.StreamConverter@4ec6f978
org.springframework.core.convert.support.StreamConverter@4ec6f978
org.springframework.core.convert.support.StreamConverter@4ec6f978
org.springframework.core.convert.support.StreamConverter@4ec6f978
org.springframework.core.convert.support.StringToArrayConverter@628a3d02
org.springframework.core.convert.support.StringToCollectionConverter@2084b9e7

----- list for DefaultFormattingConversionService -----
ConversionService converters =
@org.springframework.format.annotation.DateTimeFormat java.lang.Long -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@13f84012,@org.springframework.format.annotation.NumberFormat java.lang.Long -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
@org.springframework.format.annotation.DateTimeFormat java.time.Instant -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.Instant -> java.lang.String : org.springframework.format.datetime.standard.InstantFormatter@2748eb40
@org.springframework.format.annotation.DateTimeFormat java.time.LocalDate -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.LocalDate -> java.lang.String : org.springframework.format.datetime.standard.TemporalAccessorPrinter@6c884ad5
@org.springframework.format.annotation.DateTimeFormat java.time.LocalDateTime -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.LocalDateTime -> java.lang.String : org.springframework.format.datetime.standard.TemporalAccessorPrinter@923fa0e
@org.springframework.format.annotation.DateTimeFormat java.time.LocalTime -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.LocalTime -> java.lang.String : org.springframework.format.datetime.standard.TemporalAccessorPrinter@2f3a3ae6
@org.springframework.format.annotation.DateTimeFormat java.time.MonthDay -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.MonthDay -> java.lang.String : org.springframework.format.datetime.standard.MonthDayFormatter@581f9ff4
@org.springframework.format.annotation.DateTimeFormat java.time.OffsetDateTime -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.OffsetDateTime -> java.lang.String : org.springframework.format.datetime.standard.TemporalAccessorPrinter@32d23eb8
@org.springframework.format.annotation.DateTimeFormat java.time.OffsetTime -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.OffsetTime -> java.lang.String : org.springframework.format.datetime.standard.TemporalAccessorPrinter@513f7f97
@org.springframework.format.annotation.DateTimeFormat java.time.YearMonth -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.YearMonth -> java.lang.String : org.springframework.format.datetime.standard.YearMonthFormatter@1200e3e7
@org.springframework.format.annotation.DateTimeFormat java.time.ZonedDateTime -> java.lang.String: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.time.ZonedDateTime -> java.lang.String : org.springframework.format.datetime.standard.TemporalAccessorPrinter@108ae967
@org.springframework.format.annotation.DateTimeFormat java.util.Calendar -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@13f84012
@org.springframework.format.annotation.DateTimeFormat java.util.Date -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@13f84012
@org.springframework.format.annotation.DurationFormat java.time.Duration -> java.lang.String: org.springframework.format.datetime.standard.DurationFormatAnnotationFormatterFactory@144eeb86,java.time.Duration -> java.lang.String : org.springframework.format.datetime.standard.DurationFormatter@4ae08493
@org.springframework.format.annotation.NumberFormat java.lang.Byte -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
@org.springframework.format.annotation.NumberFormat java.lang.Double -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
@org.springframework.format.annotation.NumberFormat java.lang.Float -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
@org.springframework.format.annotation.NumberFormat java.lang.Integer -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
@org.springframework.format.annotation.NumberFormat java.lang.Short -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
@org.springframework.format.annotation.NumberFormat java.math.BigDecimal -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
@org.springframework.format.annotation.NumberFormat java.math.BigInteger -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.Boolean -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@15a0d528
java.lang.Character -> java.lang.Number : org.springframework.core.convert.support.CharacterToNumberFactory@76d10ec1
java.lang.Character -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@4624b2c6
java.lang.Enum -> java.lang.Integer : org.springframework.core.convert.support.EnumToIntegerConverter@3958c0ec
java.lang.Enum -> java.lang.String : org.springframework.core.convert.support.EnumToStringConverter@5c4d9982
java.lang.Integer -> java.lang.Enum : org.springframework.core.convert.support.IntegerToEnumConverterFactory@1497a34c
java.lang.Long -> java.time.Instant : org.springframework.format.datetime.standard.DateTimeConverters$LongToInstantConverter@6ff39d6d
java.lang.Long -> java.util.Calendar : org.springframework.format.datetime.DateFormatterRegistrar$LongToCalendarConverter@3254c5b,java.lang.Long -> java.util.Calendar : org.springframework.format.datetime.DateFormatterRegistrar$LongToCalendarConverter@5500e0fc
java.lang.Long -> java.util.Date : org.springframework.format.datetime.DateFormatterRegistrar$LongToDateConverter@1570cd69,java.lang.Long -> java.util.Date : org.springframework.format.datetime.DateFormatterRegistrar$LongToDateConverter@383f6070
java.lang.Number -> java.lang.Character : org.springframework.core.convert.support.NumberToCharacterConverter@2ef04e86
java.lang.Number -> java.lang.Number : org.springframework.core.convert.support.NumberToNumberConverterFactory@4685ccba
java.lang.Number -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@cc201c2
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.lang.Long: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@13f84012,java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Long: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.Instant: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.Instant: org.springframework.format.datetime.standard.InstantFormatter@2748eb40
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.LocalDate: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.LocalDate: org.springframework.format.datetime.standard.TemporalAccessorParser@2231e6e1
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.LocalDateTime: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.LocalDateTime: org.springframework.format.datetime.standard.TemporalAccessorParser@28ed092c
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.LocalTime: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.LocalTime: org.springframework.format.datetime.standard.TemporalAccessorParser@c6f46a8
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.MonthDay: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.MonthDay: org.springframework.format.datetime.standard.MonthDayFormatter@581f9ff4
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.OffsetDateTime: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.OffsetDateTime: org.springframework.format.datetime.standard.TemporalAccessorParser@e592a33
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.OffsetTime: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.OffsetTime: org.springframework.format.datetime.standard.TemporalAccessorParser@4253c5d7
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.YearMonth: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.YearMonth: org.springframework.format.datetime.standard.YearMonthFormatter@1200e3e7
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.time.ZonedDateTime: org.springframework.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory@2a6f4cb5,java.lang.String -> java.time.ZonedDateTime: org.springframework.format.datetime.standard.TemporalAccessorParser@17c94168
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.util.Calendar: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@13f84012
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.util.Date: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@13f84012
java.lang.String -> @org.springframework.format.annotation.DurationFormat java.time.Duration: org.springframework.format.datetime.standard.DurationFormatAnnotationFormatterFactory@144eeb86,java.lang.String -> java.time.Duration: org.springframework.format.datetime.standard.DurationFormatter@4ae08493
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Byte: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Double: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Float: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Integer: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Short: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.math.BigDecimal: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.math.BigInteger: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@458d0dea
java.lang.String -> java.lang.Boolean : org.springframework.core.convert.support.StringToBooleanConverter@3edc1581
java.lang.String -> java.lang.Character : org.springframework.core.convert.support.StringToCharacterConverter@6bdff3c4
java.lang.String -> java.lang.Enum : org.springframework.core.convert.support.StringToEnumConverterFactory@37b2e0ae
java.lang.String -> java.lang.Number : org.springframework.core.convert.support.StringToNumberConverterFactory@1bbbbe31
java.lang.String -> java.nio.charset.Charset : org.springframework.core.convert.support.StringToCharsetConverter@469bf4a9
java.lang.String -> java.time.Month: org.springframework.format.datetime.standard.MonthFormatter@1b9a1ca0
java.lang.String -> java.time.Period: org.springframework.format.datetime.standard.PeriodFormatter@2b0fbf9c
java.lang.String -> java.time.Year: org.springframework.format.datetime.standard.YearFormatter@384a4c1f
java.lang.String -> java.util.Currency : org.springframework.core.convert.support.StringToCurrencyConverter@c197804
java.lang.String -> java.util.Locale : org.springframework.core.convert.support.StringToLocaleConverter@4c4a146a
java.lang.String -> java.util.Properties : org.springframework.core.convert.support.StringToPropertiesConverter@633766fc
java.lang.String -> java.util.TimeZone : org.springframework.core.convert.support.StringToTimeZoneConverter@1fb24e9b
java.lang.String -> java.util.UUID : org.springframework.core.convert.support.StringToUUIDConverter@3d2106cc
java.lang.String -> java.util.regex.Pattern : org.springframework.core.convert.support.StringToPatternConverter@3da56139
java.nio.charset.Charset -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@71769e1d
java.time.Instant -> java.lang.Long : org.springframework.format.datetime.standard.DateTimeConverters$InstantToLongConverter@3b0e3ffd
java.time.Instant -> java.util.Date : org.springframework.core.convert.support.InstantToDateConverter@72106150
java.time.LocalDateTime -> java.time.LocalDate : org.springframework.format.datetime.standard.DateTimeConverters$LocalDateTimeToLocalDateConverter@3926bf5
java.time.LocalDateTime -> java.time.LocalTime : org.springframework.format.datetime.standard.DateTimeConverters$LocalDateTimeToLocalTimeConverter@5803f4a
java.time.Month -> java.lang.String : org.springframework.format.datetime.standard.MonthFormatter@1b9a1ca0
java.time.OffsetDateTime -> java.time.Instant : org.springframework.format.datetime.standard.DateTimeConverters$OffsetDateTimeToInstantConverter@347360a9
java.time.OffsetDateTime -> java.time.LocalDate : org.springframework.format.datetime.standard.DateTimeConverters$OffsetDateTimeToLocalDateConverter@4ad867dd
java.time.OffsetDateTime -> java.time.LocalDateTime : org.springframework.format.datetime.standard.DateTimeConverters$OffsetDateTimeToLocalDateTimeConverter@c83972c
java.time.OffsetDateTime -> java.time.LocalTime : org.springframework.format.datetime.standard.DateTimeConverters$OffsetDateTimeToLocalTimeConverter@2007b081
java.time.OffsetDateTime -> java.time.ZonedDateTime : org.springframework.format.datetime.standard.DateTimeConverters$OffsetDateTimeToZonedDateTimeConverter@c8746ad
java.time.Period -> java.lang.String : org.springframework.format.datetime.standard.PeriodFormatter@2b0fbf9c
java.time.Year -> java.lang.String : org.springframework.format.datetime.standard.YearFormatter@384a4c1f
java.time.ZoneId -> java.util.TimeZone : org.springframework.core.convert.support.ZoneIdToTimeZoneConverter@6f944df4
java.time.ZonedDateTime -> java.time.Instant : org.springframework.format.datetime.standard.DateTimeConverters$ZonedDateTimeToInstantConverter@3a09f896
java.time.ZonedDateTime -> java.time.LocalDate : org.springframework.format.datetime.standard.DateTimeConverters$ZonedDateTimeToLocalDateConverter@28b03da5
java.time.ZonedDateTime -> java.time.LocalDateTime : org.springframework.format.datetime.standard.DateTimeConverters$ZonedDateTimeToLocalDateTimeConverter@edf530c
java.time.ZonedDateTime -> java.time.LocalTime : org.springframework.format.datetime.standard.DateTimeConverters$ZonedDateTimeToLocalTimeConverter@71d6e309
java.time.ZonedDateTime -> java.time.OffsetDateTime : org.springframework.format.datetime.standard.DateTimeConverters$ZonedDateTimeToOffsetDateTimeConverter@5df275bb
java.time.ZonedDateTime -> java.util.Calendar : org.springframework.core.convert.support.ZonedDateTimeToCalendarConverter@5220c149
java.util.Calendar -> java.lang.Long : org.springframework.format.datetime.DateFormatterRegistrar$CalendarToLongConverter@59be216a,java.util.Calendar -> java.lang.Long : org.springframework.format.datetime.DateFormatterRegistrar$CalendarToLongConverter@3ee835e5
java.util.Calendar -> java.time.Instant : org.springframework.format.datetime.standard.DateTimeConverters$CalendarToInstantConverter@6ff53a98
java.util.Calendar -> java.time.LocalDate : org.springframework.format.datetime.standard.DateTimeConverters$CalendarToLocalDateConverter@2d578b1d
java.util.Calendar -> java.time.LocalDateTime : org.springframework.format.datetime.standard.DateTimeConverters$CalendarToLocalDateTimeConverter@54b7f005
java.util.Calendar -> java.time.LocalTime : org.springframework.format.datetime.standard.DateTimeConverters$CalendarToLocalTimeConverter@4f04f136
java.util.Calendar -> java.time.OffsetDateTime : org.springframework.format.datetime.standard.DateTimeConverters$CalendarToOffsetDateTimeConverter@4901e889
java.util.Calendar -> java.time.ZonedDateTime : org.springframework.format.datetime.standard.DateTimeConverters$CalendarToZonedDateTimeConverter@42aff5cc
java.util.Calendar -> java.util.Date : org.springframework.format.datetime.DateFormatterRegistrar$CalendarToDateConverter@639c7c05,java.util.Calendar -> java.util.Date : org.springframework.format.datetime.DateFormatterRegistrar$CalendarToDateConverter@5e5878a
java.util.Currency -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@6586370c
java.util.Date -> java.lang.Long : org.springframework.format.datetime.DateFormatterRegistrar$DateToLongConverter@394d268f,java.util.Date -> java.lang.Long : org.springframework.format.datetime.DateFormatterRegistrar$DateToLongConverter@7e4b2110
java.util.Date -> java.time.Instant : org.springframework.core.convert.support.DateToInstantConverter@2df707b9
java.util.Date -> java.util.Calendar : org.springframework.format.datetime.DateFormatterRegistrar$DateToCalendarConverter@1a165cb9,java.util.Date -> java.util.Calendar : org.springframework.format.datetime.DateFormatterRegistrar$DateToCalendarConverter@76dea320
java.util.Locale -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@6f5efa48
java.util.Properties -> java.lang.String : org.springframework.core.convert.support.PropertiesToStringConverter@28030040
java.util.UUID -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@5cd1c299
java.util.regex.Pattern -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@42eb38f4
org.springframework.core.convert.support.ArrayToArrayConverter@6bb38360
org.springframework.core.convert.support.ArrayToCollectionConverter@814367c
org.springframework.core.convert.support.ArrayToObjectConverter@3ff50382
org.springframework.core.convert.support.ArrayToStringConverter@bbf963c
org.springframework.core.convert.support.ByteBufferConverter@6b1f7d27
org.springframework.core.convert.support.ByteBufferConverter@6b1f7d27
org.springframework.core.convert.support.ByteBufferConverter@6b1f7d27
org.springframework.core.convert.support.ByteBufferConverter@6b1f7d27
org.springframework.core.convert.support.CollectionToArrayConverter@4f450e86
org.springframework.core.convert.support.CollectionToCollectionConverter@13555aba
org.springframework.core.convert.support.CollectionToObjectConverter@72f0830e
org.springframework.core.convert.support.CollectionToStringConverter@7bd4a771
org.springframework.core.convert.support.FallbackObjectToStringConverter@5cb05e56
org.springframework.core.convert.support.IdToEntityConverter@6ea04083,org.springframework.core.convert.support.ObjectToObjectConverter@43510c3e
org.springframework.core.convert.support.MapToMapConverter@1d45de6a
org.springframework.core.convert.support.ObjectToArrayConverter@38dbc894
org.springframework.core.convert.support.ObjectToCollectionConverter@265c2965
org.springframework.core.convert.support.ObjectToOptionalConverter@6ccdbb0f
org.springframework.core.convert.support.ObjectToOptionalConverter@6ccdbb0f
org.springframework.core.convert.support.ObjectToOptionalConverter@6ccdbb0f
org.springframework.core.convert.support.OptionalToObjectConverter@7ab53bfc
org.springframework.core.convert.support.StreamConverter@4055f4c4
org.springframework.core.convert.support.StreamConverter@4055f4c4
org.springframework.core.convert.support.StreamConverter@4055f4c4
org.springframework.core.convert.support.StreamConverter@4055f4c4
org.springframework.core.convert.support.StringToArrayConverter@31ef3c2b
org.springframework.core.convert.support.StringToCollectionConverter@10b7bd74

----- list for FormattingConversionService -----
ConversionService converters =
Original Post




This examples shows how to find out formatter and converters registered with a ConversionService by default. Spring version: 4.3.4

package com.logicbig.example;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AssignableTypeFilter;
import org.springframework.format.Formatter;

import java.util.Set;

public class SpringBuiltInFormatterFinder {
public static void main(String[] args) {
ClassPathScanningCandidateComponentProvider provider =
new ClassPathScanningCandidateComponentProvider(false);
provider.addIncludeFilter(new AssignableTypeFilter(Formatter.class));
Set<BeanDefinition> components = provider.findCandidateComponents("org/springframework");
components.stream()
.map(BeanDefinition::getBeanClassName)
.forEach(System.out::println);
}
}

Output

org.springframework.format.datetime.DateFormatter
org.springframework.format.datetime.standard.DurationFormatter
org.springframework.format.datetime.standard.InstantFormatter
org.springframework.format.datetime.standard.MonthDayFormatter
org.springframework.format.datetime.standard.MonthFormatter
org.springframework.format.datetime.standard.PeriodFormatter
org.springframework.format.datetime.standard.YearFormatter
org.springframework.format.datetime.standard.YearMonthFormatter
org.springframework.format.number.CurrencyStyleFormatter
org.springframework.format.number.NumberStyleFormatter
org.springframework.format.number.PercentStyleFormatter
org.springframework.format.number.money.CurrencyUnitFormatter
org.springframework.format.number.money.Jsr354NumberFormatAnnotationFormatterFactory$NumberDecoratingFormatter
org.springframework.format.number.money.Jsr354NumberFormatAnnotationFormatterFactory$PatternDecoratingFormatter
org.springframework.format.number.money.MonetaryAmountFormatter
Original Post




See Also

Join