返回时间戳问题
来源:3-4 用户创建请求

向量烟灰
2018-09-26
你好,请问在3-4中,
Date date = new Date();
System.err.println(date.getTime());
String content = "{\"username\":\"tom\",\"password\":\"123456\",\"birthday\":"+date.getTime()+"}";
String result = mockMvc.perform(MockMvcRequestBuilders.post("/user").contentType(MediaType.APPLICATION_JSON_UTF8).content(content)).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.jsonPath("$.id").value("1")).andReturn().getResponse().getContentAsString();
System.err.println(result);
为什么并没返回时间戳
而是返回
1537929047589
null
tom
123456
Wed Sep 26 10:30:47 CST 2018
{"id":"1","username":"tom","password":"123456","birthday":"2018-09-26T02:30:47.589+0000"}
“birthday”:“2018-09-26T02:30:47.589+0000”}
写回答
2回答
-
JoJo
2018-10-09
1537929047589 这个就是时间戳啊
112018-10-09 -
向量烟灰
提问者
2018-10-09
是那个json中不是以时间戳返回啊
00
Spring Security技术栈开发企业级认证与授权
Spring Security技术栈,REST风格开发常见接口,独立开发认证授权模块保证REST服务安全
2662 学习 · 1561 问题
相似问题