1
sjz
2025-09-16 1ba1f2d588d8a7a8b3d9b5cb94bdf1e18ff7e8c1
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