Startup.cs
@@ -30,6 +30,10 @@ services.Configure<AppSettings>( Configuration.GetSection("AppSettings")); // 添加服务注册,请求头信息传递。 services.AddHttpContextAccessor(); services.AddScoped<RequestInfo>(); services.AddSwaggerGen(c => { c.SwaggerDoc("v1", @@ -38,7 +42,7 @@ var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile); //c.IncludeXmlComments(xmlPath, true); c.IncludeXmlComments(xmlPath, true); }); //配置JSON.NET