With ref to use of java.util.date and java.sql.date in Spring based REST API
First of all, I apologise if my question sounds silly/dumb to you :)
I am working to create an API using Spring's REST Support.
One of the API functions utilises a date value--now, in the service function (which actually inserts data into JDBC data source) i have used java.sql.date.
I have created a rowmapper for the class that uses a single date value as one of its members-- I have defined this member as a java.sql.date value and hence the getter for the date value returns a java.sql.date value.
Now, in the API function where I want to insert a new row into table, I am specifying the class member as the Request Body- from which I extract the date value using the getter.