Example usage for org.springframework.data.geo.format DistanceFormatter INSTANCE

List of usage examples for org.springframework.data.geo.format DistanceFormatter INSTANCE

Introduction

In this page you can find the example usage for org.springframework.data.geo.format DistanceFormatter INSTANCE.

Prototype

DistanceFormatter INSTANCE

To view the source code for org.springframework.data.geo.format DistanceFormatter INSTANCE.

Click Source Link

Usage

From source file:org.springframework.data.web.config.SpringDataWebConfiguration.java

@Override
public void addFormatters(FormatterRegistry registry) {

    registry.addFormatter(DistanceFormatter.INSTANCE);
    registry.addFormatter(PointFormatter.INSTANCE);

    if (!(registry instanceof FormattingConversionService)) {
        return;//from w ww  .j a v a  2s .c o  m
    }

    FormattingConversionService conversionService = (FormattingConversionService) registry;

    DomainClassConverter<FormattingConversionService> converter = new DomainClassConverter<>(conversionService);
    converter.setApplicationContext(context);
}