Created
November 18, 2016 07:04
-
-
Save Cepr0/ef0f2d2f1630a24dcbf3bec89a4bcccd to your computer and use it in GitHub Desktop.
String to LocalDate converter to using with Spring Data REST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class RestConfig extends RepositoryRestConfigurerAdapter { | |
@Override | |
public void configureConversionService(ConfigurableConversionService conversionService) { | |
conversionService.addConverter(String.class, LocalDate.class, LocalDate::parse); | |
super.configureConversionService(conversionService); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment