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 to register a PropertyValueConverter with a SimplePropertyValueConverterRegistry that can be used with 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