Converters

Converters

Converters are used in mappers to convert types. They are auto-configured as Spring beans and can be customized via application.properties.

Property

Default

Description

integration.converters.enabled

true

If false, converters are not started automatically

Available Converters

DateToString

Converts date to string.

Option

Type

Property

Default

Description

defaultValue

String

integration.converters.date-to-string.default-value


Value if input is missing

format

String

integration.converters.date-to-string.format

yyyy-MM-dd

Output format (SimpleDateFormat)

inputFormat

String

integration.converters.date-to-string.input-format

yyyy-MM-dd

Input format if input is stringified date

nullValue

String

integration.converters.date-to-string.null-value

null

What counts as null input

StringToDate

Converts string to LocalDate.

Option

Type

Property

Default

Description

defaultValue

LocalDate

integration.converters.string-to-date.default-value


Value if input is missing

format

String

integration.converters.string-to-date.format

yyyy-MM-dd

Input format

Usage in mapper: stringToDate() or stringToDate(yyyy/MM/dd)

StringToDateTime

Converts string to DateTime.

Option

Type

Property

Default

Description

defaultValue

DateTime

integration.converters.string-to-date-time.default-value


Value if input is missing

format

String

integration.converters.string-to-date-time.format

yyyy-MM-dd'T'HH:mm:ss

Input format

inputTimeZone

DateTimeZone

integration.converters.string-to-date-time.input-time-zone


Input timezone

outputTimeZone

DateTimeZone

integration.converters.string-to-date-time.output-time-zone

UTC

Output timezone

Usage in mapper: stringToDateTime() or stringToDateTime(yyyy/MM/dd'T'HH:mm:ss)

StringToNumber

Converts string to BigInteger.

Option

Type

Property

Default

Description

defaultValue

BigInteger

integration.converters.string-to-number.default-value


Value if input is missing

Usage in mapper: stringToNumber or stringToNumber() or stringToNumber(5)

StringToInteger

Converts string to Integer.

Option

Type

Property

Default

Description

defaultValue

Integer

integration.converters.string-to-integer.default-value


Value if input is missing

locale

String

integration.converters.string-to-integer.locale


Decimal/thousands separator locale

Usage in mapper: stringToInteger, stringToInteger(), stringToInteger(5), stringToInteger(locale), stringToInteger(locale,defaultValue)

StringToDecimal

Converts string to BigDecimal.

Option

Type

Property

Default

Description

defaultValue

BigDecimal

integration.converters.string-to-decimal.default-value


Value if input is missing

locale

String

integration.converters.string-to-decimal.locale


Decimal/thousands separator locale

roundingMode

RoundingMode

N/A

HALF_EVEN

Rounding behavior

precision

Integer

N/A


Number of digits in unscaled value

Usage in mapper: stringToDecimal, stringToDecimal(2), stringToDecimal(de), stringToDecimal(de,2)

StringToDouble

Converts string to Double.

Option

Type

Property

Default

Description

defaultValue

Double

integration.converters.string-to-double.default-value


Value if input is missing

Usage in mapper: stringToDouble, stringToDouble(), stringToDouble(5)

EmptyStringToNull

Converts empty string to null. No configuration options.

NullToDefault

Returns default value when input matches null value.

Option

Type

Property

Default

Description

nullValue

Object

integration.converters.null-to-default.null-value

null

What counts as null

defaultValue

Object

integration.converters.null-to-default.default-value

null

Value to return

Usage in mapper: nullToDefault, nullToDefault(0), nullToDefault(,0) (empty nullValue, default 0)

StringRight

Returns rightmost N characters.

Option

Type

Property

Default

Description

len

Integer

integration.converters.string-right.len


Length from right

Usage in mapper: stringRight(2)

StringLeft

Returns leftmost N characters.

Option

Type

Property

Default

Description

len

Integer

integration.converters.string-left.len


Length from left

Usage in mapper: stringLeft(2)

DateTimeToString

Converts DateTime to string.

Option

Type

Property

Default

Description

defaultValue

String

integration.converters.date-time-to-string.default-value


Value if input is missing

format

String

integration.converters.date-time-to-string.format

yyyy-MM-dd'T'HH:mm:ss

Output format

outputTimeZone

DateTimeZone

integration.converters.date-time-to-string.output-time-zone

UTC

Output timezone

DecimalToString

Converts BigDecimal to string.

Option

Type

Property

Default

Description

defaultValue

String

integration.converters.decimal-to-string.default-value


Value if input is missing

format

NumberFormat

integration.converters.decimal-to-string.format


Number format

locale

Locale

integration.converters.decimal-to-string.locale

server locale

Decimal/thousands separator

pattern

String

integration.converters.decimal-to-string.pattern


Display pattern for zeros, prefixes, grouping

Quick Reference

Converter

Bean Name

Input

Output

Mapper Expression

DateToString

dateToString

Date

String

N/A

StringToDate

stringToDate

String

LocalDate

stringToDate()

StringToDateTime

stringToDateTime

String

DateTime

stringToDateTime()

StringToNumber

stringToNumber

String

BigInteger

stringToNumber()

StringToInteger

stringToInteger

String

Integer

stringToInteger()

StringToDecimal

stringToDecimal

String

BigDecimal

stringToDecimal()

StringToDouble

stringToDouble

String

Double

stringToDouble()

EmptyStringToNull

emptyStringToNull

String

null

N/A

NullToDefault

nullToDefault

Object

Object

nullToDefault()

StringRight

stringRight

String

String

stringRight(n)

StringLeft

stringLeft

String

String

stringLeft(n)

DateTimeToString

dateTimeToString

DateTime

String

N/A

DecimalToString

decimalToString

BigDecimal

String

N/A

Common Pitfalls

  • Locale-sensitive parsing -- StringToDecimal and StringToInteger use the server's default locale if none is specified. German locale uses comma as decimal separator (1.234,56), while US locale uses period (1,234.56).

  • Date format mismatch -- Ensure the format pattern matches your input data exactly. A mismatch causes silent failures or parse exceptions.

  • Converter chaining -- Converters cannot be chained in a single mapper field. Use a Groovy expression for multi-step conversions.