I am working on spring boot and gradle for creating a rest service. Now I need to format the json date in the form of \"yyyy-MM-dd\", i.e, the format should be dateOfBirth: \"16
With Spring Boot, you should be able to set the default way that Jackson formats dates by setting the following property in your application.yml/application.properties:
spring.jackson.date-format= # Date format string (e.g. yyyy-MM-dd HH:mm:ss), or a fully-qualified date format class name (e.g. com.fasterxml.jackson.databind.util.ISO8601DateFormat)