From 67965cce30e900f9b6091170745ecf115f64e23d Mon Sep 17 00:00:00 2001 From: qwj <qwjzorro@163.com> Date: 星期三, 02 八月 2023 17:15:33 +0800 Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/DocumentService --- DocumentServiceAPI.Web.Core/Startup.cs | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/DocumentServiceAPI.Web.Core/Startup.cs b/DocumentServiceAPI.Web.Core/Startup.cs index fa37eb2..984c08d 100644 --- a/DocumentServiceAPI.Web.Core/Startup.cs +++ b/DocumentServiceAPI.Web.Core/Startup.cs @@ -1,9 +1,11 @@ 锘縰sing DocumentServiceAPI.Core; +using DocumentServiceAPI.Model; using Furion; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using System.Text.Json.Serialization; namespace DocumentServiceAPI.Web.Core; @@ -12,14 +14,14 @@ public void ConfigureServices(IServiceCollection services) { services.AddConsoleFormatter(); - services.AddJwt<JwtHandler>(); - //娣诲姞Sqlsugar - services.AddSqlsugarSetup(App.Configuration); + services.AddJwt<JwtHandler>(); services.AddCorsAccessor(); - services.AddControllers() - .AddInjectWithUnifyResult(); + services.AddControllers().AddJsonOptions(options => + options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter())); ; + services.AddInjectWithUnifyResult<DSRESTFulResultProvider>(); + } public void Configure(IApplicationBuilder app, IWebHostEnvironment env) -- Gitblit v1.9.1