Jelajahi Sumber

😁调整JSON配置文件制表符缩进为2个字符

zuohuaijun 2 tahun lalu
induk
melakukan
dac99d914f

+ 31 - 31
Admin.NET/Admin.NET.Application/Configuration/APIJSON.json

@@ -1,34 +1,34 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "APIJSON": {
-        "Roles": [
-            {
-                "RoleName": "Role1", // 权限名称 唯一
-                "Select": { // 查询
-                    "Table": [ "*" ], // 可操作的表
-                    "Column": [ "tb.*" ], // 可操作的字段
-                    "Filter": []
-                },
-                "Insert": { // 添加
-                    "Table": [ "table1", "table2", "table3" ],
-                    "Column": [ "tb.*", "tb.*", "tb.*" ]
-                },
-                "Update": { // 修改
-                    "Table": [ "table1", "table2", "table3" ],
-                    "Column": [ "tb.*", "tb.*", "tb.*" ]
-                },
-                "Delete": { // 删除
-                    "Table": [ "table1", "table2", "table3" ]
-                }
-            },
-            {
-                "RoleName": "Role2",
-                "Select": {
-                    "Table": [ "table1" ],
-                    "Column": [ "*" ]
-                }
-            }
-        ]
-    }
+  "APIJSON": {
+    "Roles": [
+      {
+        "RoleName": "Role1", // 权限名称 唯一
+        "Select": { // 查询
+          "Table": [ "*" ], // 可操作的表
+          "Column": [ "tb.*" ], // 可操作的字段
+          "Filter": []
+        },
+        "Insert": { // 添加
+          "Table": [ "table1", "table2", "table3" ],
+          "Column": [ "tb.*", "tb.*", "tb.*" ]
+        },
+        "Update": { // 修改
+          "Table": [ "table1", "table2", "table3" ],
+          "Column": [ "tb.*", "tb.*", "tb.*" ]
+        },
+        "Delete": { // 删除
+          "Table": [ "table1", "table2", "table3" ]
+        }
+      },
+      {
+        "RoleName": "Role2",
+        "Select": {
+          "Table": [ "table1" ],
+          "Column": [ "*" ]
+        }
+      }
+    ]
+  }
 }

+ 40 - 40
Admin.NET/Admin.NET.Application/Configuration/App.json

@@ -1,45 +1,45 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "Urls": "http://*:5005", // 配置默认端口
-    // "https_port": 44325,
+  "Urls": "http://*:5005", // 配置默认端口
+  // "https_port": 44325,
 
-    "AllowedHosts": "*",
+  "AllowedHosts": "*",
 
-    "AppSettings": {
-        "InjectSpecificationDocument": true // 生产环境是否开启Swagger
-    },
-    "DynamicApiControllerSettings": {
-        //"DefaultRoutePrefix": "api", // 默认路由前缀
-        "CamelCaseSeparator": "", // 驼峰命名分隔符
-        "SplitCamelCase": false, // 切割骆驼(驼峰)/帕斯卡命名
-        "LowercaseRoute": false, // 小写路由格式
-        "AsLowerCamelCase": true, // 小驼峰命名(首字母小写)
-        "KeepVerb": false, // 保留动作方法请求谓词
-        "KeepName": false // 保持原有名称不处理
-    },
-    "FriendlyExceptionSettings": {
-        "DefaultErrorMessage": "系统异常,请联系管理员",
-        "ThrowBah": true, // 是否将 Oops.Oh 默认抛出为业务异常
-        "LogError": false // 是否输出异常日志
-    },
-    "LocalizationSettings": {
-        "SupportedCultures": [ "zh-CN", "en" ], // 语言列表
-        "DefaultCulture": "zh-CN", // 默认语言
-        "DateTimeFormatCulture": "zh-CN" // 固定时间区域为特定时区(多语言)
-    },
-    "CorsAccessorSettings": {
-        "WithExposedHeaders": [ "Content-Disposition", "X-Pagination", "access-token", "x-access-token" ], // 如果前端不代理且是axios请求
-        "SignalRSupport": true // 启用 SignalR 跨域支持
-    },
-    "SnowId": {
-        "WorkerId": 1, // 机器码 全局唯一
-        "WorkerIdBitLength": 1, // 机器码位长 默认值6,取值范围 [1, 19]
-        "SeqBitLength": 6 // 序列数位长 默认值6,取值范围 [3, 21](建议不小于4,值越大性能越高、Id位数也更长)
-    },
-    "Cryptogram": {
-        "CryptoType": "SM2", // 密码加密算法:MD5、SM2、SM4
-        "PublicKey": "04F6E0C3345AE42B51E06BF50B98834988D54EBC7460FE135A48171BC0629EAE205EEDE253A530608178A98F1E19BB737302813BA39ED3FA3C51639D7A20C7391A", // 公钥
-        "PrivateKey": "3690655E33D5EA3D9A4AE1A1ADD766FDEA045CDEAA43A9206FB8C430CEFE0D94" // 私钥
-    }
+  "AppSettings": {
+    "InjectSpecificationDocument": true // 生产环境是否开启Swagger
+  },
+  "DynamicApiControllerSettings": {
+    //"DefaultRoutePrefix": "api", // 默认路由前缀
+    "CamelCaseSeparator": "", // 驼峰命名分隔符
+    "SplitCamelCase": false, // 切割骆驼(驼峰)/帕斯卡命名
+    "LowercaseRoute": false, // 小写路由格式
+    "AsLowerCamelCase": true, // 小驼峰命名(首字母小写)
+    "KeepVerb": false, // 保留动作方法请求谓词
+    "KeepName": false // 保持原有名称不处理
+  },
+  "FriendlyExceptionSettings": {
+    "DefaultErrorMessage": "系统异常,请联系管理员",
+    "ThrowBah": true, // 是否将 Oops.Oh 默认抛出为业务异常
+    "LogError": false // 是否输出异常日志
+  },
+  "LocalizationSettings": {
+    "SupportedCultures": [ "zh-CN", "en" ], // 语言列表
+    "DefaultCulture": "zh-CN", // 默认语言
+    "DateTimeFormatCulture": "zh-CN" // 固定时间区域为特定时区(多语言)
+  },
+  "CorsAccessorSettings": {
+    "WithExposedHeaders": [ "Content-Disposition", "X-Pagination", "access-token", "x-access-token" ], // 如果前端不代理且是axios请求
+    "SignalRSupport": true // 启用 SignalR 跨域支持
+  },
+  "SnowId": {
+    "WorkerId": 1, // 机器码 全局唯一
+    "WorkerIdBitLength": 1, // 机器码位长 默认值6,取值范围 [1, 19]
+    "SeqBitLength": 6 // 序列数位长 默认值6,取值范围 [3, 21](建议不小于4,值越大性能越高、Id位数也更长)
+  },
+  "Cryptogram": {
+    "CryptoType": "SM2", // 密码加密算法:MD5、SM2、SM4
+    "PublicKey": "04F6E0C3345AE42B51E06BF50B98834988D54EBC7460FE135A48171BC0629EAE205EEDE253A530608178A98F1E19BB737302813BA39ED3FA3C51639D7A20C7391A", // 公钥
+    "PrivateKey": "3690655E33D5EA3D9A4AE1A1ADD766FDEA045CDEAA43A9206FB8C430CEFE0D94" // 私钥
+  }
 }

+ 5 - 5
Admin.NET/Admin.NET.Application/Configuration/Cache.json

@@ -1,8 +1,8 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "Cache": {
-        "CacheType": "Memory", // Memory、Redis
-        "RedisConnectionString": "server=127.0.0.1:6379;password=;db=5;" // Redis连接字符串
-    }
+  "Cache": {
+    "CacheType": "Memory", // Memory、Redis
+    "RedisConnectionString": "server=127.0.0.1:6379;password=;db=5;" // Redis连接字符串
+  }
 }

+ 14 - 14
Admin.NET/Admin.NET.Application/Configuration/CodeGen.json

@@ -1,17 +1,17 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    // 代码生成配置项-程序集名称集合
-    "CodeGen": {
-        "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ],
-        "BaseEntityNames": [ "EntityTenant", "EntityBase", "EntityBaseId" ],
-        "EntityBaseColumn": {
-            "EntityTenant": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "IsDelete", "TenantId" ],
-            "EntityBase": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "IsDelete" ],
-            "EntityBaseId": [ "Id", "TenantId" ],
-            "BaseId": [ "Id" ]
-        },
-        "FrontRootPath": "Web", // 前端文件根目录
-        "BackendApplicationNamespace": "Admin.NET.Application" // 后端生成到的项目
-    }
+  // 代码生成配置项-程序集名称集合
+  "CodeGen": {
+    "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ],
+    "BaseEntityNames": [ "EntityTenant", "EntityBase", "EntityBaseId" ],
+    "EntityBaseColumn": {
+      "EntityTenant": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "IsDelete", "TenantId" ],
+      "EntityBase": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "IsDelete" ],
+      "EntityBaseId": [ "Id", "TenantId" ],
+      "BaseId": [ "Id" ]
+    },
+    "FrontRootPath": "Web", // 前端文件根目录
+    "BackendApplicationNamespace": "Admin.NET.Application" // 后端生成到的项目
+  }
 }

+ 26 - 26
Admin.NET/Admin.NET.Application/Configuration/Database.json

@@ -1,29 +1,29 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "DbConnection": {
-        // 具体配置见SqlSugar官网(第一个为默认库不需要设置ConfigId)
-        "ConnectionConfigs": [
-            {
-                "DbType": "Sqlite", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access、OpenGauss、QuestDB、HG、ClickHouse、GBase、Odbc、Custom
-                "ConnectionString": "DataSource=./Admin.NET.db", // 库连接字符串
-                "EnableInitDb": true, // 启用库表初始化
-                "EnableInitSeed": true, // 启用种子初始化
-                "EnableIncreTable": false, // 启用增量表更新
-                "EnableDiffLog": false, // 启用库表差异日志
-                "EnableUnderLine": false // 启用驼峰转下划线
-            }
-            //// 其他数据库配置(可以配置多个)
-            //{
-            //    "ConfigId": "test",
-            //    "DbType": "Sqlite",
-            //    "ConnectionString": "DataSource=./test.db", // 库连接字符串
-            //    "EnableInitDb": true, // 启用库表初始化
-            //    "EnableInitSeed": true, // 启用种子初始化
-            //    "EnableIncreTable": false, // 启用增量表更新
-            //    "EnableDiffLog": false, // 启用库表差异日志
-            //    "EnableUnderLine": false // 启用驼峰转下划线
-            //}
-        ]
-    }
+  "DbConnection": {
+    // 具体配置见SqlSugar官网(第一个为默认库不需要设置ConfigId)
+    "ConnectionConfigs": [
+      {
+        "DbType": "Sqlite", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access、OpenGauss、QuestDB、HG、ClickHouse、GBase、Odbc、Custom
+        "ConnectionString": "DataSource=./Admin.NET.db", // 库连接字符串
+        "EnableInitDb": true, // 启用库表初始化
+        "EnableInitSeed": true, // 启用种子初始化
+        "EnableIncreTable": false, // 启用增量表更新
+        "EnableDiffLog": false, // 启用库表差异日志
+        "EnableUnderLine": false // 启用驼峰转下划线
+      }
+      //// 其他数据库配置(可以配置多个)
+      //{
+      //    "ConfigId": "test",
+      //    "DbType": "Sqlite",
+      //    "ConnectionString": "DataSource=./test.db", // 库连接字符串
+      //    "EnableInitDb": true, // 启用库表初始化
+      //    "EnableInitSeed": true, // 启用种子初始化
+      //    "EnableIncreTable": false, // 启用增量表更新
+      //    "EnableDiffLog": false, // 启用库表差异日志
+      //    "EnableUnderLine": false // 启用驼峰转下划线
+      //}
+    ]
+  }
 }

+ 12 - 12
Admin.NET/Admin.NET.Application/Configuration/Email.json

@@ -1,15 +1,15 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "Email": {
-        "Host": "smtp.163.com", // 主机
-        "Port": 465, // 端口 465、994、25
-        "DefaultFromEmail": "zuohuaijun@163.com", // 默认发件者邮箱
-        "DefaultToEmail": "515096995@qq.com", // 默认接收人邮箱
-        "EnableSsl": true, // 启用SSL
-        "UseDefaultCredentials": false, //是否使用默认凭据
-        "UserName": "", // 邮箱账号
-        "Password": "", // 邮箱授权码
-        "DefaultFromName": "系统邮件" // 默认邮件标题
-    }
+  "Email": {
+    "Host": "smtp.163.com", // 主机
+    "Port": 465, // 端口 465、994、25
+    "DefaultFromEmail": "zuohuaijun@163.com", // 默认发件者邮箱
+    "DefaultToEmail": "515096995@qq.com", // 默认接收人邮箱
+    "EnableSsl": true, // 启用SSL
+    "UseDefaultCredentials": false, //是否使用默认凭据
+    "UserName": "", // 邮箱账号
+    "Password": "", // 邮箱授权码
+    "DefaultFromName": "系统邮件" // 默认邮件标题
+  }
 }

+ 5 - 5
Admin.NET/Admin.NET.Application/Configuration/Enum.json

@@ -1,8 +1,8 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    // 枚举实体所在程序集名称集合
-    "Enum": {
-        "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application", "Admin.NET.AppCPMS" ]
-    }
+  // 枚举实体所在程序集名称集合
+  "Enum": {
+    "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application", "Admin.NET.AppCPMS" ]
+  }
 }

+ 12 - 12
Admin.NET/Admin.NET.Application/Configuration/JWT.json

@@ -1,15 +1,15 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "JWTSettings": {
-        "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true
-        "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16
-        "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true
-        "ValidIssuer": "Admin.NET", // 签发方,string 类型
-        "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true
-        "ValidAudience": "Admin.NET", // 签收方,string 类型
-        "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true
-        "ClockSkew": 5, // 过期时间容错值,long 类型,单位秒,默认5秒
-        "Algorithm": "HS256" // 加密算法,string 类型,默认 HS256
-    }
+  "JWTSettings": {
+    "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true
+    "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16
+    "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true
+    "ValidIssuer": "Admin.NET", // 签发方,string 类型
+    "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true
+    "ValidAudience": "Admin.NET", // 签收方,string 类型
+    "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true
+    "ClockSkew": 5, // 过期时间容错值,long 类型,单位秒,默认5秒
+    "Algorithm": "HS256" // 加密算法,string 类型,默认 HS256
+  }
 }

+ 114 - 114
Admin.NET/Admin.NET.Application/Configuration/Limit.json

@@ -1,121 +1,121 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    // IP限流配置
-    "IpRateLimiting": {
-        // 例如:设置每分钟5次访问限流
-        // 当False时:每个接口都加入计数,不管你访问哪个接口,只要在一分钟内累计够5次,将禁止访问。
-        // 当True 时:当一分钟请求了5次GetData接口,则该接口将在时间段内禁止访问,但是还可以访问PostData()5次,总得来说是每个接口都有5次在这一分钟,互不干扰。
-        "EnableEndpointRateLimiting": true,
-        // 如果StackBlockedRequests设置为false,拒绝的API调用不会添加到调用次数计数器上。比如:如果客户端每秒发出3个请求并且您设置了每秒一个调用的限制,
-        // 则每分钟或每天计数器等其他限制将仅记录第一个调用,即成功的API调用。如果您希望被拒绝的API调用计入其他时间的显示(分钟,小时等),则必须设置
-        "StackBlockedRequests": false,
-        // 在RealIpHeader使用时,你的Kestrel服务器背后是一个反向代理,如果你的代理服务器使用不同的页眉然后提取客户端IP X-Real-IP使用此选项来设置它。
-        "RealIpHeader": "X-Real-IP",
-        // 将ClientIdHeader被用于提取白名单的客户端ID。如果此标头中存在客户端ID并且与ClientWhitelist中指定的值匹配,则不应用速率限制。
-        "ClientIdHeader": "X-ClientId",
-        // IP白名单:支持Ipv4和Ipv6
-        "IpWhitelist": [],
-        // 端点白名单
-        "EndpointWhitelist": [],
-        // 客户端白名单
-        "ClientWhitelist": [],
-        "QuotaExceededResponse": {
-            "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问过于频繁,请稍后重试!\",\"result\":null,\"extras\":null}}",
-            "ContentType": "application/json",
-            "StatusCode": 429
-        },
-        // 返回状态码
-        "HttpStatusCode": 429,
-        // API规则,结尾一定要带*
-        "GeneralRules": [
-            // 1秒钟只能调用1次
-            {
-                "Endpoint": "*",
-                "Period": "1s",
-                "Limit": 10
-            },
-            // 1分钟只能调用100次
-            {
-                "Endpoint": "*",
-                "Period": "1m",
-                "Limit": 1000
-            },
-            // 1小时只能调用1000
-            {
-                "Endpoint": "*",
-                "Period": "1h",
-                "Limit": 10000
-            },
-            // 1天只能调用10000次
-            {
-                "Endpoint": "*",
-                "Period": "1d",
-                "Limit": 1000000
-            }
-        ]
-    },
-    "IpRateLimitPolicies": {
-        "IpRules": [
-            {
-                "Ip": "XXX.XXX.XXX.XXX",
-                "Rules": [
-                    {
-                        "Endpoint": "*",
-                        "Period": "1s",
-                        "Limit": 10
-                    },
-                    {
-                        "Endpoint": "*",
-                        "Period": "1m",
-                        "Limit": 1000
-                    }
-                ]
-            }
-        ]
+  // IP限流配置
+  "IpRateLimiting": {
+    // 例如:设置每分钟5次访问限流
+    // 当False时:每个接口都加入计数,不管你访问哪个接口,只要在一分钟内累计够5次,将禁止访问。
+    // 当True 时:当一分钟请求了5次GetData接口,则该接口将在时间段内禁止访问,但是还可以访问PostData()5次,总得来说是每个接口都有5次在这一分钟,互不干扰。
+    "EnableEndpointRateLimiting": true,
+    // 如果StackBlockedRequests设置为false,拒绝的API调用不会添加到调用次数计数器上。比如:如果客户端每秒发出3个请求并且您设置了每秒一个调用的限制,
+    // 则每分钟或每天计数器等其他限制将仅记录第一个调用,即成功的API调用。如果您希望被拒绝的API调用计入其他时间的显示(分钟,小时等),则必须设置
+    "StackBlockedRequests": false,
+    // 在RealIpHeader使用时,你的Kestrel服务器背后是一个反向代理,如果你的代理服务器使用不同的页眉然后提取客户端IP X-Real-IP使用此选项来设置它。
+    "RealIpHeader": "X-Real-IP",
+    // 将ClientIdHeader被用于提取白名单的客户端ID。如果此标头中存在客户端ID并且与ClientWhitelist中指定的值匹配,则不应用速率限制。
+    "ClientIdHeader": "X-ClientId",
+    // IP白名单:支持Ipv4和Ipv6
+    "IpWhitelist": [],
+    // 端点白名单
+    "EndpointWhitelist": [],
+    // 客户端白名单
+    "ClientWhitelist": [],
+    "QuotaExceededResponse": {
+      "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问过于频繁,请稍后重试!\",\"result\":null,\"extras\":null}}",
+      "ContentType": "application/json",
+      "StatusCode": 429
     },
-    // 客户端限流配置
-    "ClientRateLimiting": {
-        "EnableEndpointRateLimiting": true,
-        "ClientIdHeader": "X-ClientId",
-        "EndpointWhitelist": [],
-        "ClientWhitelist": [],
-        "QuotaExceededResponse": {
-            "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问人数过多,请稍后重试!\",\"result\":null,\"extras\":null}}",
-            "ContentType": "application/json",
-            "StatusCode": 429
-        },
-        "HttpStatusCode": 429,
-        "GeneralRules": [
-            {
-                "Endpoint": "*",
-                "Period": "1s",
-                "Limit": 10
-            },
-            {
-                "Endpoint": "*",
-                "Period": "1m",
-                "Limit": 1000
-            }
+    // 返回状态码
+    "HttpStatusCode": 429,
+    // API规则,结尾一定要带*
+    "GeneralRules": [
+      // 1秒钟只能调用1次
+      {
+        "Endpoint": "*",
+        "Period": "1s",
+        "Limit": 10
+      },
+      // 1分钟只能调用100次
+      {
+        "Endpoint": "*",
+        "Period": "1m",
+        "Limit": 1000
+      },
+      // 1小时只能调用1000
+      {
+        "Endpoint": "*",
+        "Period": "1h",
+        "Limit": 10000
+      },
+      // 1天只能调用10000次
+      {
+        "Endpoint": "*",
+        "Period": "1d",
+        "Limit": 1000000
+      }
+    ]
+  },
+  "IpRateLimitPolicies": {
+    "IpRules": [
+      {
+        "Ip": "XXX.XXX.XXX.XXX",
+        "Rules": [
+          {
+            "Endpoint": "*",
+            "Period": "1s",
+            "Limit": 10
+          },
+          {
+            "Endpoint": "*",
+            "Period": "1m",
+            "Limit": 1000
+          }
         ]
+      }
+    ]
+  },
+  // 客户端限流配置
+  "ClientRateLimiting": {
+    "EnableEndpointRateLimiting": true,
+    "ClientIdHeader": "X-ClientId",
+    "EndpointWhitelist": [],
+    "ClientWhitelist": [],
+    "QuotaExceededResponse": {
+      "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问人数过多,请稍后重试!\",\"result\":null,\"extras\":null}}",
+      "ContentType": "application/json",
+      "StatusCode": 429
     },
-    "ClientRateLimitPolicies": {
-        "ClientRules": [
-            {
-                "ClientId": "xxx-xxx",
-                "Rules": [
-                    {
-                        "Endpoint": "*",
-                        "Period": "1s",
-                        "Limit": 10
-                    },
-                    {
-                        "Endpoint": "*",
-                        "Period": "1m",
-                        "Limit": 1000
-                    }
-                ]
-            }
+    "HttpStatusCode": 429,
+    "GeneralRules": [
+      {
+        "Endpoint": "*",
+        "Period": "1s",
+        "Limit": 10
+      },
+      {
+        "Endpoint": "*",
+        "Period": "1m",
+        "Limit": 1000
+      }
+    ]
+  },
+  "ClientRateLimitPolicies": {
+    "ClientRules": [
+      {
+        "ClientId": "xxx-xxx",
+        "Rules": [
+          {
+            "Endpoint": "*",
+            "Period": "1s",
+            "Limit": 10
+          },
+          {
+            "Endpoint": "*",
+            "Period": "1m",
+            "Limit": 1000
+          }
         ]
-    }
+      }
+    ]
+  }
 }

+ 35 - 35
Admin.NET/Admin.NET.Application/Configuration/Logging.json

@@ -1,39 +1,39 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "Logging": {
-        "LogLevel": {
-            "Default": "Information",
-            "Microsoft.AspNetCore": "Warning",
-            "Microsoft.EntityFrameworkCore": "Information"
-        },
-        "File": {
-            "Enabled": false, // 启用文件日志
-            "FileName": "logs/{0:yyyyMMdd}_{1}.log", // 日志文件
-            "Append": true, // 追加覆盖
-            // "MinimumLevel": "Information", // 日志级别
-            "FileSizeLimitBytes": 10485760, // 10M=10*1024*1024
-            "MaxRollingFiles": 30 // 只保留30个文件
-        },
-        "Database": {
-            "Enabled": true, // 启用数据库日志
-            "MinimumLevel": "Information"
-        },
-        "ElasticSearch": {
-            "Enabled": false, // 启用ES日志
-            "ServerUris": [ "http://dilon:123456@192.168.1.100:9200" ], // 地址
-            "DefaultIndex": "adminnet" // 索引
-        },
-        "Monitor": {
-            "GlobalEnabled": true, // 启用全局拦截日志
-            "IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效
-            "ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效
-            "BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别
-            "WithReturnValue": true, // 是否包含返回值,默认true
-            "ReturnValueThreshold": 500, // 返回值字符串阈值,默认0全量输出
-            "JsonBehavior": "None", // 是否输出Json,默认None(OnlyJson、All)
-            "JsonIndented": false, // 是否格式化Json
-            "UseUtcTimestamp": false // 时间格式UTC、LOCAL
-        }
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft.AspNetCore": "Warning",
+      "Microsoft.EntityFrameworkCore": "Information"
+    },
+    "File": {
+      "Enabled": false, // 启用文件日志
+      "FileName": "logs/{0:yyyyMMdd}_{1}.log", // 日志文件
+      "Append": true, // 追加覆盖
+      // "MinimumLevel": "Information", // 日志级别
+      "FileSizeLimitBytes": 10485760, // 10M=10*1024*1024
+      "MaxRollingFiles": 30 // 只保留30个文件
+    },
+    "Database": {
+      "Enabled": true, // 启用数据库日志
+      "MinimumLevel": "Information"
+    },
+    "ElasticSearch": {
+      "Enabled": false, // 启用ES日志
+      "ServerUris": [ "http://dilon:123456@192.168.1.100:9200" ], // 地址
+      "DefaultIndex": "adminnet" // 索引
+    },
+    "Monitor": {
+      "GlobalEnabled": true, // 启用全局拦截日志
+      "IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效
+      "ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效
+      "BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别
+      "WithReturnValue": true, // 是否包含返回值,默认true
+      "ReturnValueThreshold": 500, // 返回值字符串阈值,默认0全量输出
+      "JsonBehavior": "None", // 是否输出Json,默认None(OnlyJson、All)
+      "JsonIndented": false, // 是否格式化Json
+      "UseUtcTimestamp": false // 时间格式UTC、LOCAL
     }
+  }
 }

+ 6 - 6
Admin.NET/Admin.NET.Application/Configuration/OAuth.json

@@ -1,10 +1,10 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "OAuth": {
-        "Weixin": {
-            "ClientId": "wxd77174ddc828b65b",
-            "ClientSecret": "6224502b24d31acf8b4e0dc8e482317c"
-        }
+  "OAuth": {
+    "Weixin": {
+      "ClientId": "wxd77174ddc828b65b",
+      "ClientSecret": "6224502b24d31acf8b4e0dc8e482317c"
     }
+  }
 }

+ 18 - 18
Admin.NET/Admin.NET.Application/Configuration/OSS.json

@@ -1,21 +1,21 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "Upload": {
-        "Path": "Upload/{yyyy}/{MM}/{dd}", // 文件上传目录
-        "MaxSize": 1048576, // 文件最大限制
-        "ContentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ],
-        "EnableMd5": true // 启用文件MDF5验证-防止重复上传
-    },
-    "OSSProvider": {
-        "IsEnable": false,
-        "Provider": "Aliyun", // Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud
-        "Endpoint": "",
-        "Region": "",
-        "AccessKey": "",
-        "SecretKey": "",
-        "IsEnableHttps": true,
-        "IsEnableCache": true,
-        "Bucket": ""
-    }
+  "Upload": {
+    "Path": "Upload/{yyyy}/{MM}/{dd}", // 文件上传目录
+    "MaxSize": 1048576, // 文件最大限制
+    "ContentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ],
+    "EnableMd5": true // 启用文件MDF5验证-防止重复上传
+  },
+  "OSSProvider": {
+    "IsEnable": false,
+    "Provider": "Aliyun", // Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud
+    "Endpoint": "",
+    "Region": "",
+    "AccessKey": "",
+    "SecretKey": "",
+    "IsEnableHttps": true,
+    "IsEnableCache": true,
+    "Bucket": ""
+  }
 }

+ 39 - 39
Admin.NET/Admin.NET.Application/Configuration/Swagger.json

@@ -1,42 +1,42 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "SpecificationDocumentSettings": {
-        "DocumentTitle": "Admin.NET 框架",
-        "GroupOpenApiInfos": [
-            {
-                "Group": "Default",
-                "Title": "Admin.NET",
-                "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
-                "Version": "1.0.0",
-                "TermsOfService": "https://dotnetchina.gitee.io/furion/",
-                "Contact": {
-                    "Name": "zuohuaijun",
-                    "Email": "515096995@qq.com",
-                    "Url": "https://gitee.com/zuohuaijun/Admin.NET"
-                }
-            },
-            {
-                "Group": "All Groups",
-                "Title": "所有接口",
-                "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
-                "Version": "1.0.0",
-                "TermsOfService": "https://dotnetchina.gitee.io/furion/",
-                "Contact": {
-                    "Name": "zuohuaijun",
-                    "Email": "515096995@qq.com",
-                    "Url": "https://gitee.com/zuohuaijun/Admin.NET"
-                }
-            }
-        ],
-        "DefaultGroupName": "Default", // 默认分组名
-        "DocExpansionState": "List", // List、Full、None
-        "EnableAllGroups": true,
-        "LoginInfo": {
-            "Enabled": true, // 是否开启Swagger登录
-            "CheckUrl": "/swagger/checkUrl",
-            "SubmitUrl": "/swagger/submitUrl"
-        },
-        "EnumToNumber": true // 枚举类型生成值类型
-    }
+  "SpecificationDocumentSettings": {
+    "DocumentTitle": "Admin.NET 框架",
+    "GroupOpenApiInfos": [
+      {
+        "Group": "Default",
+        "Title": "Admin.NET",
+        "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
+        "Version": "1.0.0",
+        "TermsOfService": "https://dotnetchina.gitee.io/furion/",
+        "Contact": {
+          "Name": "zuohuaijun",
+          "Email": "515096995@qq.com",
+          "Url": "https://gitee.com/zuohuaijun/Admin.NET"
+        }
+      },
+      {
+        "Group": "All Groups",
+        "Title": "所有接口",
+        "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
+        "Version": "1.0.0",
+        "TermsOfService": "https://dotnetchina.gitee.io/furion/",
+        "Contact": {
+          "Name": "zuohuaijun",
+          "Email": "515096995@qq.com",
+          "Url": "https://gitee.com/zuohuaijun/Admin.NET"
+        }
+      }
+    ],
+    "DefaultGroupName": "Default", // 默认分组名
+    "DocExpansionState": "List", // List、Full、None
+    "EnableAllGroups": true,
+    "LoginInfo": {
+      "Enabled": true, // 是否开启Swagger登录
+      "CheckUrl": "/swagger/checkUrl",
+      "SubmitUrl": "/swagger/submitUrl"
+    },
+    "EnumToNumber": true // 枚举类型生成值类型
+  }
 }

+ 24 - 24
Admin.NET/Admin.NET.Application/Configuration/Wechat.json

@@ -1,27 +1,27 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "Wechat": {
-        // 公众号
-        "WechatAppId": "",
-        "WechatAppSecret": "",
-        // 小程序
-        "WxOpenAppId": "",
-        "WxOpenAppSecret": ""
-    },
-    // 微信支付
-    "WechatPay": {
-        "AppId": "", // 微信公众平台AppId、开放平台AppId、小程序AppId、企业微信CorpId
-        "MerchantId": "", // 商户平台的商户号
-        "MerchantV3Secret": "", // 商户平台的APIv3密钥
-        "MerchantCertificateSerialNumber": "", // 商户平台的证书序列号
-        "MerchantCertificatePrivateKey": "\\WxPayCert\\apiclient_key.pem" // 商户平台的API证书私钥(apiclient_key.pem文件内容)
-    },
-    // 支付回调
-    "PayCallBack": {
-        "WechatPayUrl": "https://xxx/api/sysWechatPay/payCallBack", // 微信支付回调
-        "WechatRefundUrl": "", // 微信退款回调
-        "AlipayUrl": "", // 支付宝支付回调
-        "AlipayRefundUrl": "" // 支付宝退款回调
-    }
+  "Wechat": {
+    // 公众号
+    "WechatAppId": "",
+    "WechatAppSecret": "",
+    // 小程序
+    "WxOpenAppId": "",
+    "WxOpenAppSecret": ""
+  },
+  // 微信支付
+  "WechatPay": {
+    "AppId": "", // 微信公众平台AppId、开放平台AppId、小程序AppId、企业微信CorpId
+    "MerchantId": "", // 商户平台的商户号
+    "MerchantV3Secret": "", // 商户平台的APIv3密钥
+    "MerchantCertificateSerialNumber": "", // 商户平台的证书序列号
+    "MerchantCertificatePrivateKey": "\\WxPayCert\\apiclient_key.pem" // 商户平台的API证书私钥(apiclient_key.pem文件内容)
+  },
+  // 支付回调
+  "PayCallBack": {
+    "WechatPayUrl": "https://xxx/api/sysWechatPay/payCallBack", // 微信支付回调
+    "WechatRefundUrl": "", // 微信退款回调
+    "AlipayUrl": "", // 支付宝支付回调
+    "AlipayRefundUrl": "" // 支付宝退款回调
+  }
 }

+ 1 - 1
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -33,7 +33,7 @@
     <PackageReference Include="OnceMi.AspNetCore.OSS" Version="1.1.9" />
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.30.0" />
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="2.20.0" />
-    <PackageReference Include="SqlSugarCore" Version="5.1.4.99" />
+    <PackageReference Include="SqlSugarCore" Version="5.1.4.100" />
     <PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.4" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />

+ 2 - 2
Admin.NET/Admin.NET.Web.Entry/appsettings.Development.json

@@ -1,5 +1,5 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "ConfigurationScanDirectories": [ "Configuration", "" ]
+  "ConfigurationScanDirectories": [ "Configuration", "" ]
 }

+ 2 - 2
Admin.NET/Admin.NET.Web.Entry/appsettings.json

@@ -1,5 +1,5 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "ConfigurationScanDirectories": [ "Configuration", "" ] // 扫描配置文件json文件夹(自动合并该文件夹里面所有json文件)
+  "ConfigurationScanDirectories": [ "Configuration", "" ] // 扫描配置文件json文件夹(自动合并该文件夹里面所有json文件)
 }