@Override public void addFormatters(FormatterRegistry registry) { if (!(registry instanceof FormattingConversionService)) { log.warn("Unable to register Spring Data Jpa converter"); return; } DomainClassConverter<FormattingConversionService> converter = new DomainClassConverter<FormattingConversionService>( (FormattingConversionService) registry); converter.setApplicationContext(this.context); }
@Override public void addFormatters(FormatterRegistry registry) { registry.addFormatter(DistanceFormatter.INSTANCE); registry.addFormatter(PointFormatter.INSTANCE); if (!(registry instanceof FormattingConversionService)) { return; } FormattingConversionService conversionService = (FormattingConversionService) registry; DomainClassConverter<FormattingConversionService> converter = new DomainClassConverter<FormattingConversionService>(conversionService); converter.setApplicationContext(context); }
@Bean public DomainClassConverter domainClassConverter(ConversionService conversionService) { return new DomainClassConverter(conversionService); }
@Bean public DomainClassConverter<FormattingConversionService> domainClassConverter() { return new DomainClassConverter<>(mvcConversionService()); }
@Bean public DomainClassConverter<?> domainClassConverter() { return new DomainClassConverter<FormattingConversionService>(conversionService); }
@Bean public DomainClassConverter<?> domainClassConverter(ConfigurableConversionService conversionService) { return new DomainClassConverter<>(conversionService); }