Class PropertyValueConverterRegistrar<P extends PersistentProperty<P>>

java.lang.Object
org.springframework.data.convert.PropertyValueConverterRegistrar<P>

public class PropertyValueConverterRegistrar<P extends PersistentProperty<P>> extends Object
Configuration class used to register a PropertyValueConverter with a SimplePropertyValueConverterRegistry that can be used in PropertyValueConversions.

It is possible to register type safe converters via registerConverter(Class, Function)

 registrar.registerConverter(Person.class, Person::getName) //
                .writing(StringConverter::encrypt) //
                .reading(StringConverter::decrypt);
 
Since:
2.7
Author:
Christoph Strobl, Oliver Drotbohm