| | |
| | | using 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; |
| | | |
| | |
| | | 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) |