update 返回时间格式修改

This commit is contained in:
2021-04-26 15:03:05 +08:00
parent 789b3b88d2
commit 104f223410

View File

@@ -26,7 +26,9 @@ namespace Ewide.Web.Core
.AddMvcFilter<RequestActionFilter>()
.AddInjectWithUnifyResult<XnRestfulResultProvider>()
// 在管道中增加NewtonsoftJson,防止参数类型严格验证
.AddNewtonsoftJson()
.AddNewtonsoftJson(options => {
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
})
.AddJsonOptions(options =>
{
//options.JsonSerializerOptions.DefaultBufferSize = 10_0000;//返回较大数据数据序列化时会截断原因默认缓冲区大小以字节为单位为16384。