Could you tell me what should I speak from the front the json data into a date data format to the control layer
CodePudding user response:
Change the control layer is also answered the String parameter, wrote the model to dateCodePudding user response:
You can change a train of thought, because of the general control layer receives the parameters are of type string, you can receive in the background to the value of time, through the Java string transfer date, in the background of transformation, and then apply transformation after the date of the type of data in your subsequent logicallyYou can baidu "Java string transfer date"
May code is as follows:
SimpleDateFormat SimpleDateFormat=new SimpleDateFormat (" yyyy - MM - dd HH: MM: ss ");
String dateStr="2019-01-03 10:59:27";
The Date the Date=simpleDateFormat. Parse (dateStr);
This date is the data you want