Close

Spring Framework - FormatterRegistry Examples

Spring Framework 

    @Override
public void addFormatters (FormatterRegistry registry) {
AddressFormatAnnotationFormatterFactory factory = new
AddressFormatAnnotationFormatterFactory();

registry.addFormatterForFieldAnnotation(factory);
}
Original Post




    @Override
public void addFormatters (FormatterRegistry registry) {
registry.addConverter(new TradeIdToTradeConverter(tradeService()));
}
Original Post




    @Override
public void addFormatters (FormatterRegistry registry) {
AddressFormatter addressFormatter = new AddressFormatter();
addressFormatter.setStyle(AddressFormatter.Style.REGION);
registry.addFormatter(addressFormatter);
}
Original Post




See Also