Home > front end >  Why DataTables with Ajax calls mysql DateTime field, part of the loss only date time?
Why DataTables with Ajax calls mysql DateTime field, part of the loss only date time?

Time:03-03

Why DataTables with Ajax calls mysql DateTime field, part of the loss only date time?
Even mysql backend I used springboot
The controller is as follows:
@ ResponseBody
@ RequestMapping ("/list + {tao} ")
Public Object list (@ PathVariable (" tao ") String tao) {
Map The map=new HashMap (a);
//List List=service. ShowAll ();
List List=service. SelectbyTaonnumber (tao);
The map. The put (" data ", a list);
return map;
Front end:
Var dt_computer=$(' # table_id). DataTable ({
"Dom" : 'lfrtip'
"Ajax" : {
"Url" : "+"/computer/list + tao,
"DataSrc" : "data"
},
The actual data should be: 2021/03/01 16:45:55
The results showed that only 2021/03/01 00:00:00

CodePudding user response:

Is it because the json, behind the ":" the content of the truncated?
  • Related