Spring 如何把日期时间放在身上邮递员
我试过这个,但对我无效。Spring 如何把日期时间放在身上邮递员,spring,postman,Spring,Postman,我试过这个,但对我无效。 我在DB(Mysql)中得到了空值“date_creation” 我使用“请求前脚本”选项卡将日期保存到变量中: var current_timestamp = new Date(); postman.setEnvironmentVariable("current_timestamp", current_timestamp.toISOString()); { “肋骨”:“123456789”, “客户代码”:“3”, “taux”:“19”,
我在DB(Mysql)中得到了空值“date_creation”
我使用“请求前脚本”选项卡将日期保存到变量中:
var current_timestamp = new Date();
postman.setEnvironmentVariable("current_timestamp", current_timestamp.toISOString());
{
“肋骨”:“123456789”,
“客户代码”:“3”,
“taux”:“19”,
“decouvert”:“150”,
“索尔德”:“8500”,
“创建日期”:“{current\u timestamp}”
}
您必须为请求正文选择Raw并键入JSON
您可以通过打开控制台视图>显示邮递员控制台来检查发送到数据库的内容
然后单击控制台中的请求>请求正文
显示实际发送到服务器的内容
如果仍然失败,那么这不是postman的问题,而是您的应用程序的问题您得到了什么错误?我没有得到错误,但我在数据库(Mysql)中得到了空值谢谢,我尝试了,我在控制台中得到了日期,但在DB[1]中仍然为空:这是您的端点的问题,您应该让开发人员修复它