Closed Paramood closed 7 months ago
Our CustomConversions
supports only ConverterAware
, GenericConverter
, ConverterFactory
and plain Converter
. We do not support ConditionalConverter
because CustomConversions
determines convertible pairs before even applying the converter to build a registry of types that we can convert from/to. I created https://github.com/spring-projects/spring-data-commons/issues/3040 to document the supported types.
Actual behavior:
If
getConvertibleTypes
method returnsnull
, the converter is ignored at all.Expected behavior:
If
getConvertibleTypes
method returnsnull
, thenmatches
method must be used instead for the converter. This is how it works in Spring if usingConditionalGenericConverter
for controller layer and this is what the doc says.From javadoc of
getConvertibleTypes
method:Sample project with tests to reproduce the issue: r2dbc-sample.zip
Adding breakpoint into
matches
method of DB converter does not cause debugger to stop. But for controller converter it does.Spring Boot version: 3.2.2