org.springframework.boot.convert

Class ApplicationConversionService

    • Constructor Detail

      • ApplicationConversionService

        public ApplicationConversionService()
      • ApplicationConversionService

        public ApplicationConversionService(StringValueResolver embeddedValueResolver)
    • Method Detail

      • getSharedInstance

        public static ConversionService getSharedInstance()
        Return a shared default ApplicationConversionService instance, lazily building it once needed.
        Returns:
        the shared ConversionService instance (never null)
      • configure

        public static void configure(FormatterRegistry registry)
        Configure the given FormatterRegistry with formatters and converters appropriate for most Spring Boot applications.
        Parameters:
        registry - the registry of converters to add to (must also be castable to ConversionService, e.g. being a ConfigurableConversionService)
        Throws:
        ClassCastException - if the given FormatterRegistry could not be cast to a ConversionService
      • addApplicationConverters

        public static void addApplicationConverters(ConverterRegistry registry)
        Add converters useful for most Spring Boot applications.
        Parameters:
        registry - the registry of converters to add to (must also be castable to ConversionService, e.g. being a ConfigurableConversionService)
        Throws:
        ClassCastException - if the given ConverterRegistry could not be cast to a ConversionService
      • addDelimitedStringConverters

        public static void addDelimitedStringConverters(ConverterRegistry registry)
        Add converters to support delimited strings.
        Parameters:
        registry - the registry of converters to add to (must also be castable to ConversionService, e.g. being a ConfigurableConversionService)
        Throws:
        ClassCastException - if the given ConverterRegistry could not be cast to a ConversionService
      • addApplicationFormatters

        public static void addApplicationFormatters(FormatterRegistry registry)
        Add formatters useful for most Spring Boot applications.
        Parameters:
        registry - the service to register default formatters with