Example usage for org.springframework.data.repository.support DomainClassConverter DomainClassConverter

List of usage examples for org.springframework.data.repository.support DomainClassConverter DomainClassConverter

Introduction

In this page you can find the example usage for org.springframework.data.repository.support DomainClassConverter DomainClassConverter.

Prototype

public DomainClassConverter(T conversionService) 

Source Link

Document

Creates a new DomainClassConverter for the given ConversionService .

Usage

From source file:com.gopivotal.cla.web.WebConfiguration.java

@Bean
public DomainClassConverter<?> domainClassConverter(ConfigurableConversionService conversionService) {
    return new DomainClassConverter<>(conversionService);
}

From source file:com.boot.pf.config.WebMvcConfig.java

@Bean
public DomainClassConverter<?> domainClassConverter() {
    return new DomainClassConverter<FormattingConversionService>(mvcConversionService);
}

From source file:org.springframework.data.rest.tests.RepositoryTestsConfig.java

@Bean
public DefaultFormattingConversionService defaultConversionService() {

    DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();

    DomainClassConverter<FormattingConversionService> converter = new DomainClassConverter<FormattingConversionService>(
            conversionService);/*from w  w  w  . j a v a  2  s . com*/
    converter.setApplicationContext(appCtx);

    return conversionService;
}

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 ww  w.jav  a 2s  .c  o m*/
    }

    FormattingConversionService conversionService = (FormattingConversionService) registry;

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