From 4cf18f0b8392afbd591a59c2bb5cf7afadf862a3 Mon Sep 17 00:00:00 2001 From: zhangqi <2794379662@qq.com> Date: Fri, 12 Mar 2021 17:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QRCodeService/Startup.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/QRCodeService/Startup.cs b/QRCodeService/Startup.cs index 058d576..650615e 100644 --- a/QRCodeService/Startup.cs +++ b/QRCodeService/Startup.cs @@ -79,10 +79,10 @@ namespace QRCodeService services.AddScoped(); services.AddScoped(); //Queries - services.AddScoped( s=>new LinkQueries(Configuration.GetConnectionString("Default"))); + services.AddScoped(s => new LinkQueries(Configuration.GetConnectionString("Default"))); services.AddScoped(s => new AppQueries(Configuration.GetConnectionString("Default"))); //redis cache - services.AddDistributedRedisCache(options=>options.Configuration=Configuration.GetSection("redis:default").Value); + services.AddDistributedRedisCache(options => options.Configuration = Configuration.GetSection("redis:default").Value); //反向代理中间件 services.Configure(options => @@ -95,12 +95,12 @@ namespace QRCodeService // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - app.UseSwagger(); - app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "QRCodeService v1")); - } + //if (env.IsDevelopment()) + //{ + app.UseDeveloperExceptionPage(); + app.UseSwagger(); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "QRCodeService v1")); + //} app.UseForwardedHeaders(); app.UseRouting();