cnf
2025-09-11 7563cdc2d0cd2fe79e5a78f3dbcbc4405fb4d852
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