List of usage examples for org.springframework.data.rest.webmvc.config RepositoryRestConfigurerAdapter RepositoryRestConfigurerAdapter
RepositoryRestConfigurerAdapter
From source file:de.knightsoftnet.validationexample.server.spring.SpringDataConfig.java
/** * define classes which should retourn the id's. * //w w w . j a v a 2 s . c om * @return RepositoryRestConfigurer */ @Bean public RepositoryRestConfigurer repositoryRestConfigurer() { return new RepositoryRestConfigurerAdapter() { @Override public void configureRepositoryRestConfiguration(final RepositoryRestConfiguration config) { config.exposeIdsFor(Person.class); } }; }
From source file:example.app.web.RepositoryExampleRestWebApplication.java
@Bean
RepositoryRestConfigurer repositoryRestConfigurer() {
return new RepositoryRestConfigurerAdapter() {
@Override/*www. j a v a2s . co m*/
public void configureJacksonObjectMapper(ObjectMapper objectMapper) {
super.configureJacksonObjectMapper(objectMapper);
LocalDateDeserializer.register(objectMapper);
}
@Override
public void configureConversionService(ConfigurableConversionService conversionService) {
super.configureConversionService(conversionService);
conversionService.addConverter(StringToPhoneNumberConverter.INSTANCE);
}
};
}