소스 검색

拆分json配置文件并移到应用层

zuohuaijun 3 년 전
부모
커밋
bc60d09435

+ 47 - 2
Admin.NET/Admin.NET.Application/Admin.NET.Application.csproj

@@ -8,12 +8,24 @@
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>
-    <None Remove="AppConfig.json" />
     <None Remove="Admin.NET.Application.xml" />
     <None Remove="Admin.NET.Application.xml" />
+    <None Remove="Configuration\appsettings.json" />
+    <None Remove="Configuration\Limit.json" />
+    <None Remove="Configuration\Logging.json" />
   </ItemGroup>
   </ItemGroup>
 
 
   <ItemGroup>
   <ItemGroup>
-    <Content Include="AppConfig.json">
+    <Content Include="Configuration\Logging.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+      <ExcludeFromSingleFile>true</ExcludeFromSingleFile>
+      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
+    </Content>
+    <Content Include="Configuration\appsettings.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+      <ExcludeFromSingleFile>true</ExcludeFromSingleFile>
+      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
+    </Content>
+    <Content Include="Configuration\Limit.json">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
   </ItemGroup>
   </ItemGroup>
@@ -23,6 +35,39 @@
   </ItemGroup>
   </ItemGroup>
 
 
   <ItemGroup>
   <ItemGroup>
+    <None Update="Configuration\App.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Cache.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\CodeGen.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\DbConnection.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Email.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\JWT.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\OAuth.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\OSS.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\SnowId.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Swagger.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Wechat.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <None Update="Temp\CovidReport.html">
     <None Update="Temp\CovidReport.html">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>

+ 28 - 0
Admin.NET/Admin.NET.Application/Configuration/App.json

@@ -0,0 +1,28 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Urls": "https://*:5005",
+    "AllowedHosts": "*",
+
+    "AppSettings": {
+        "InjectSpecificationDocument": true // 生产环境是否开启Swagger
+    },
+    "DynamicApiControllerSettings": {
+        "LowercaseRoute": false,
+        "KeepName": true,
+        "AsLowerCamelCase": true // 小驼峰路由路径
+    },
+    "FriendlyExceptionSettings": {
+        "DefaultErrorMessage": "系统异常,请联系管理员",
+        "ThrowBah": true,
+        "LogError": false // 是否输出异常日志,默认true
+    },
+    "LocalizationSettings": {
+        "SupportedCultures": [ "zh-CN", "en-US" ], // 语言列表
+        "DefaultCulture": "zh-CN" // 默认语言
+    },
+    "CorsAccessorSettings": {
+        "WithExposedHeaders": [ "Content-Disposition" ], // 如果前端不代理且是axios请求
+        "SignalRSupport": true // 启用 SignalR 跨域支持
+    }
+}

+ 8 - 0
Admin.NET/Admin.NET.Application/Configuration/Cache.json

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

+ 10 - 0
Admin.NET/Admin.NET.Application/Configuration/CodeGen.json

@@ -0,0 +1,10 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    // 代码生成配置项-程序集名称集合
+    "CodeGen": {
+        "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ],
+        "FrontRootPath": "Vben2", //前端文件根目录
+        "BackendApplicationNamespace": "Admin.NET.Application" //后端生成到的项目
+    }
+}

+ 23 - 0
Admin.NET/Admin.NET.Application/Configuration/DbConnection.json

@@ -0,0 +1,23 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "DbConnection": {
+        // ConnectionConfig具体配置见SqlSugar
+        "ConnectionConfigs": [
+            {
+                "ConfigId": "default",
+                "DbType": "Sqlite", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access
+                "ConnectionString": "DataSource=./Admin.NET.db",
+                "EnableInitDb": true, // 启用库表初始化
+                "EnableDiffLog": false // 启用库表差异日志
+            }
+            //{
+            //    "ConfigId": "test",
+            //    "DbType": "Sqlite",
+            //    "ConnectionString": "DataSource=./Test.db",
+            //    "EnableInitDb": true, // 启用库表初始化
+            //    "EnableDiffLog": false // 启用库表差异日志
+            //}
+        ]
+    }
+}

+ 14 - 0
Admin.NET/Admin.NET.Application/Configuration/Email.json

@@ -0,0 +1,14 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Email": {
+        "Server": "smtp.163.com", // 主机
+        "Port": 465, // 端口 465/994 25
+        "SenderName": "系统邮件", // 发送者名称
+        "SenderEmail": "zuohuaijun@163.com", // 发件者邮箱
+        "ToEmail": "515096995@qq.com", // 接收人邮箱
+        "Account": "", // 发件邮箱账号
+        "Password": "", // 发件邮箱密码
+        "Security": true // 启用SSL和TLS
+    }
+}

+ 18 - 0
Admin.NET/Admin.NET.Application/Configuration/JWT.json

@@ -0,0 +1,18 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/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
+        "ExpiredTime": 10080, // 过期时间,long 类型,单位分钟,默认20分钟
+        "ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒
+    },
+    "RefreshToken": {
+        "ExpiredTime": 20160 // 过期时间单位分钟(一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)
+    }
+}

+ 0 - 0
Admin.NET/Admin.NET.Core/RateLimitConfig.json → Admin.NET/Admin.NET.Application/Configuration/Limit.json


+ 37 - 0
Admin.NET/Admin.NET.Application/Configuration/Logging.json

@@ -0,0 +1,37 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Logging": {
+        "LogLevel": {
+            "Default": "Information",
+            "Microsoft.AspNetCore": "Warning"
+        },
+        "File": {
+            "Enabled": true, // 启用文件日志
+            "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)
+            "UseUtcTimestamp": false // 时间格式UTC、LOCAL
+        }
+    }
+}

+ 10 - 0
Admin.NET/Admin.NET.Application/Configuration/OAuth.json

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

+ 20 - 0
Admin.NET/Admin.NET.Application/Configuration/OSS.json

@@ -0,0 +1,20 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/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" ]
+    },
+    "OSSProvider": {
+        "IsEnable": false,
+        "Provider": "Aliyun", // Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud
+        "Endpoint": "",
+        "Region": "",
+        "AccessKey": "",
+        "SecretKey": "",
+        "IsEnableHttps": true,
+        "IsEnableCache": true,
+        "Bucket": ""
+    }
+}

+ 7 - 0
Admin.NET/Admin.NET.Application/Configuration/SnowId.json

@@ -0,0 +1,7 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "SnowId": {
+        "WorkerId": 5 // 取值范围0~63,默认1
+    }
+}

+ 41 - 0
Admin.NET/Admin.NET.Application/Configuration/Swagger.json

@@ -0,0 +1,41 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/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",
+                    "Url": "https://gitee.com/zuohuaijun/Admin.NET",
+                    "Email": "515096995@qq.com"
+                }
+            },
+            {
+                "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",
+                    "Url": "https://gitee.com/zuohuaijun/Admin.NET",
+                    "Email": "515096995@qq.com"
+                }
+            }
+        ],
+        "EnableAllGroups": true,
+        "LoginInfo": {
+            "Enabled": false, // 是否开启Swagger登录
+            "CheckUrl": "/Swagger/CheckUrl",
+            "SubmitUrl": "/Swagger/SubmitUrl",
+            "UserName": "admin",
+            "Password": "000000"
+        }
+    }
+}

+ 0 - 26
Admin.NET/Admin.NET.Application/AppConfig.json → Admin.NET/Admin.NET.Application/Configuration/Wechat.json

@@ -1,32 +1,6 @@
 {
 {
     "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
     "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
 
 
-    "DbConnection": {
-        // ConnectionConfig具体配置见SqlSugar
-        "ConnectionConfigs": [
-            {
-                "ConfigId": "default",
-                "DbType": "Sqlite", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access
-                "ConnectionString": "DataSource=./Admin.NET.db",
-                "EnableInitDb": true, // 启用库表初始化
-                "EnableDiffLog": false // 启用库表差异日志
-            },
-            {
-                "ConfigId": "test",
-                "DbType": "Sqlite",
-                "ConnectionString": "DataSource=./Test.db",
-                "EnableInitDb": true, // 启用库表初始化
-                "EnableDiffLog": false // 启用库表差异日志
-            }
-        ]
-    },
-    // 代码生成配置项-程序集名称集合
-    "CodeGen": {
-        "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ],
-        "FrontRootPath": "Vben2", //前端文件根目录
-        "BackendApplicationNamespace": "Admin.NET.Application" //后端生成到的项目
-    },
-    // 微信相关
     "Wechat": {
     "Wechat": {
         // 公众号
         // 公众号
         "WechatAppId": "",
         "WechatAppId": "",

+ 40 - 0
Admin.NET/Admin.NET.Application/Configuration/appsettings.json

@@ -0,0 +1,40 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Urls": "https://*:5005",
+
+    "Logging": {
+        "LogLevel": {
+            "Default": "Information",
+            "Microsoft.AspNetCore": "Warning"
+        },
+        "File": {
+            "Enabled": true, // 启用文件日志
+            "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)
+            "UseUtcTimestamp": false // 时间格式UTC、LOCAL
+        }
+    },
+    "AllowedHosts": "*"
+}

+ 4 - 15
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -9,25 +9,14 @@
 
 
   <ItemGroup>
   <ItemGroup>
     <None Remove="Admin.NET.Core.xml" />
     <None Remove="Admin.NET.Core.xml" />
-    <None Remove="AdminNETConfig.json" />
-    <None Remove="RateLimitConfig.json" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Content Include="AdminNETConfig.json">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="RateLimitConfig.json">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
   </ItemGroup>
   </ItemGroup>
 
 
   <ItemGroup>
   <ItemGroup>
     <PackageReference Include="AngleSharp" Version="0.17.1" />
     <PackageReference Include="AngleSharp" Version="0.17.1" />
     <PackageReference Include="AspNetCoreRateLimit" Version="4.0.2" />
     <PackageReference Include="AspNetCoreRateLimit" Version="4.0.2" />
-    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.7.6" />
-    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.7.6" />
-    <PackageReference Include="Furion.Pure" Version="4.7.6" />
+    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.7.7" />
+    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.7.7" />
+    <PackageReference Include="Furion.Pure" Version="4.7.7" />
     <PackageReference Include="Lazy.Captcha.Core" Version="1.1.6" />
     <PackageReference Include="Lazy.Captcha.Core" Version="1.1.6" />
     <PackageReference Include="Magicodes.IE.Excel" Version="2.7.0" />
     <PackageReference Include="Magicodes.IE.Excel" Version="2.7.0" />
     <PackageReference Include="Magicodes.IE.Pdf" Version="2.7.0" />
     <PackageReference Include="Magicodes.IE.Pdf" Version="2.7.0" />
@@ -42,7 +31,7 @@
     <PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.22" />
     <PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.22" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
-    <PackageReference Include="Masuit.Tools.Core" Version="2.5.7.3" />
+    <PackageReference Include="Masuit.Tools.Core" Version="2.5.7.4" />
   </ItemGroup>
   </ItemGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 0 - 115
Admin.NET/Admin.NET.Core/AdminNETConfig.json

@@ -1,115 +0,0 @@
-{
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/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",
-                    "Url": "https://gitee.com/zuohuaijun/Admin.NET",
-                    "Email": "515096995@qq.com"
-                }
-            },
-            {
-                "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",
-                    "Url": "https://gitee.com/zuohuaijun/Admin.NET",
-                    "Email": "515096995@qq.com"
-                }
-            }
-        ],
-        "EnableAllGroups": true,
-        "LoginInfo": {
-            "Enabled": false, // 是否开启Swagger登录
-            "CheckUrl": "/Swagger/CheckUrl",
-            "SubmitUrl": "/Swagger/SubmitUrl",
-            "UserName": "admin",
-            "Password": "000000"
-        }
-    },
-    "AppSettings": {
-        "InjectSpecificationDocument": true // 生产环境是否开启Swagger
-    },
-    "DynamicApiControllerSettings": {
-        "LowercaseRoute": false,
-        "KeepName": true,
-        "AsLowerCamelCase": true // 小驼峰路由路径
-    },
-    "FriendlyExceptionSettings": {
-        "DefaultErrorMessage": "系统异常,请联系管理员",
-        "ThrowBah": true,
-        "LogError": false // 是否输出异常日志,默认true
-    },
-    "LocalizationSettings": {
-        "SupportedCultures": [ "zh-CN", "en-US" ], // 语言列表
-        "DefaultCulture": "zh-CN" // 默认语言
-    },
-    "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
-        "ExpiredTime": 10080, // 过期时间,long 类型,单位分钟,默认20分钟
-        "ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒
-    },
-    "RefreshToken": {
-        "ExpiredTime": 20160 // 过期时间单位分钟(一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)
-    },
-    "CorsAccessorSettings": {
-        "WithExposedHeaders": [ "Content-Disposition" ], // 如果前端不代理且是axios请求
-        "SignalRSupport": true // 启用 SignalR 跨域支持
-    },
-    "Cache": {
-        "CacheType": "Memory", // Memory、Redis
-        "RedisConnectionString": "server=127.0.0.1:6379;password=;db=5;"
-    },
-    "SnowId": {
-        "WorkerId": 5 // 取值范围0~63,默认1
-    },
-    "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" ]
-    },
-    "OSSProvider": {
-        "IsEnable": false,
-        "Provider": "Aliyun", // Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud
-        "Endpoint": "",
-        "Region": "",
-        "AccessKey": "",
-        "SecretKey": "",
-        "IsEnableHttps": true,
-        "IsEnableCache": true,
-        "Bucket": ""
-    },
-    "Email": {
-        "Server": "smtp.163.com", // 主机
-        "Port": 465, // 端口 465/994 25
-        "SenderName": "系统邮件", // 发送者名称
-        "SenderEmail": "zuohuaijun@163.com", // 发件者邮箱
-        "ToEmail": "515096995@qq.com", // 接收人邮箱
-        "Account": "", // 发件邮箱账号
-        "Password": "", // 发件邮箱密码
-        "Security": true // 启用SSL和TLS
-    },
-    "OAuth": {
-        "Weixin": {
-            "ClientId": "wxd77174ddc828b65b",
-            "ClientSecret": "6224502b24d31acf8b4e0dc8e482317c"
-        }
-    }
-}

+ 1 - 36
Admin.NET/Admin.NET.Web.Entry/appsettings.Development.json

@@ -1,40 +1,5 @@
 {
 {
     "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
     "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
 
 
-    "Urls": "https://*:5005",
-
-    "Logging": {
-        "LogLevel": {
-            "Default": "Information",
-            "Microsoft.AspNetCore": "Warning"
-        },
-        "File": {
-            "Enabled": true, // 启用文件日志
-            "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)
-            "UseUtcTimestamp": false // 时间格式UTC、LOCAL
-        }
-    },
-    "AllowedHosts": "*"
+    "ConfigurationScanDirectories": [ "Configuration", "" ]
 }
 }

+ 1 - 36
Admin.NET/Admin.NET.Web.Entry/appsettings.json

@@ -1,40 +1,5 @@
 {
 {
     "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
     "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
 
 
-    "Urls": "https://*:5005",
-
-    "Logging": {
-        "LogLevel": {
-            "Default": "Information",
-            "Microsoft.AspNetCore": "Warning"
-        },
-        "File": {
-            "Enabled": true, // 启用文件日志
-            "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)
-            "UseUtcTimestamp": false // 时间格式UTC、LOCAL
-        }
-    },
-    "AllowedHosts": "*"
+    "ConfigurationScanDirectories": [ "Configuration", "" ]
 }
 }