List of usage examples for org.springframework.core.convert.support DefaultConversionService addDefaultConverters
public static void addDefaultConverters(ConverterRegistry converterRegistry)
From source file:org.ldaptive.beans.spring.SpringLdapEntryMapper.java
/** * Creates an evaluation context to use in the spring class descriptor. Adds * the default converters from the default conversion service. * * @param object to supply to the evaluation context * * @return evalutation context/*from ww w .j a va2 s. c om*/ */ protected EvaluationContext createEvaluationContext(final Object object) { final GenericConversionService conversionService = new GenericConversionService(); DefaultConversionService.addDefaultConverters(conversionService); if (converters != null) { for (Converter<?, ?> converter : converters) { conversionService.addConverter(converter); } } addDefaultConverters(conversionService); final StandardEvaluationContext context = new StandardEvaluationContext(object); context.setTypeConverter(new StandardTypeConverter(conversionService)); return context; }