Currently it is unclear from the documentation how conversions, converter factories and type mappings can be customized with relation to the built-in ones. For example, I have to do this if I want to create a custom conversion which overrides one of the built-in ones:
ValueMapperBuilder.preconfigured()
.addConversions(myCustomConversions) // takes priority over built-in ones
but if I want to override a converter factory, I have to do it in a more complicated way:
ValueMapperBuilder.unconfigured()
.addConversions(Conversions.all)
.addConverterFactories(myCustomConverterFactories) // takes priority over built-in ones
.addConverterFactories(ConverterFactories.all)
.addTypeMappings(TypeMappings.all)
(because, apparently, earlier converter factories have priority over later ones, but later conversions have priority over earlier ones)
Ideally, this behavior should be documented somewhere, and probably unified (so e.g. the shorter form always works, for all types of customizations).
Currently it is unclear from the documentation how conversions, converter factories and type mappings can be customized with relation to the built-in ones. For example, I have to do this if I want to create a custom conversion which overrides one of the built-in ones:
but if I want to override a converter factory, I have to do it in a more complicated way:
(because, apparently, earlier converter factories have priority over later ones, but later conversions have priority over earlier ones)
Ideally, this behavior should be documented somewhere, and probably unified (so e.g. the shorter form always works, for all types of customizations).