Files
shgx_tz_mes_backend_sync/ZR.Admin.WebApi/appsettings.json

134 lines
4.6 KiB
JSON
Raw Normal View History

2021-08-23 16:57:25 +08:00
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
2021-09-19 11:36:52 +08:00
},
"dbConfigs": [
{
"Conn": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=admin;Password=admin123;Initial Catalog=ZrAdmin;",
"DbType": 1, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
"ConfigId": "0", //多租户唯一标识
"IsAutoCloseConnection": true
}
//...下面添加更多的数据库源
],
2023-06-23 16:36:00 +08:00
//代码生成数据库配置
"CodeGenDbConfig": {
//代码生成连接字符串,注意{dbName}为固定格式,不要填写数据库名
"Conn": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=admin;Password=admin123;Initial Catalog={dbName};",
"DbType": 1,
"IsAutoCloseConnection": true,
"DbName": "ZrAdmin" //代码生成默认连接数据库
},
2022-06-01 17:25:41 +08:00
"urls": "http://localhost:8888", //项目启动url如果改动端口前端对应devServer也需要进行修改
2023-06-24 21:40:28 +08:00
"corsUrls": [ "http://localhost:8887", "http://localhost:8886" ], //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开
2021-12-03 17:42:44 +08:00
"JwtSettings": {
2023-06-07 13:41:42 +08:00
"Issuer": "ZRAdmin.NET", //即token的签发者。
"Audience": "ZRAdmin.NET", //指该token是服务于哪个群体的群体范围
2021-12-08 13:31:31 +08:00
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
2022-06-01 17:25:41 +08:00
"Expire": 1440 //jwt登录过期时间
2021-12-03 17:42:44 +08:00
},
"InjectClass": [ "ZR.Repository", "ZR.Service", "ZR.Tasks" ], //自动注入类
2023-06-01 18:47:11 +08:00
"InitDb": false, //是否初始化db
2022-06-01 17:25:41 +08:00
"DemoMode": false, //是否演示模式
2021-09-19 11:36:52 +08:00
"Upload": {
2022-07-12 21:12:52 +08:00
"uploadUrl": "http://localhost:8888", //本地存储资源访问路径
2023-06-30 09:42:35 +08:00
"localSavePath": "", //本地上传默认文件存储目录 wwwroot
2022-07-12 21:12:52 +08:00
"maxSize": 15, //上传文件大小限制 15M
2022-10-11 21:45:15 +08:00
"notAllowedExt": [ ".bat", ".exe", ".jar", ".js" ]
2021-09-19 11:36:52 +08:00
},
2022-06-01 17:25:41 +08:00
//阿里云存储配置
2021-11-29 13:46:55 +08:00
"ALIYUN_OSS": {
2022-07-12 21:12:52 +08:00
"REGIONID": "", //egcn-hangzhou
2021-09-19 11:36:52 +08:00
"KEY": "XX",
2021-11-29 13:46:55 +08:00
"SECRET": "XX",
"bucketName": "bucketName",
2022-07-12 21:12:52 +08:00
"domainUrl": "http://xxx.xxx.com", //访问资源域名
"maxSize": 100 //上传文件大小限制 100M
2021-09-19 11:36:52 +08:00
},
2022-07-09 19:02:36 +08:00
//企业微信通知配置
"WxCorp": {
"AgentID": "",
"CorpID": "",
"CorpSecret": "",
"SendUser": "@all"
},
//代码生成配置
2021-09-19 11:36:52 +08:00
"gen": {
2022-06-01 17:25:41 +08:00
"autoPre": true, //自动去除表前缀
2022-05-26 13:32:55 +08:00
"author": "admin",
2022-06-01 17:25:41 +08:00
"tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)",
"vuePath": "", //前端代码存储路径egD:\Work\ZRAdmin-Vue3
"csharpTypeArr": {
"string": [ "varchar", "nvarchar", "text", "longtext" ],
"int": [ "int", "integer", "smallint", "int4", "int8", "int2" ],
"long": [ "bigint", "number" ],
"float": [ "numeric", "real", "float" ],
"decimal": [ "money", "decimal", "smallmoney" ],
"dateTime": [ "date", "datetime", "datetime2", "smalldatetime", "timestamp" ],
"byte": [ "tinyint" ],
"bool": [ "bit" ]
}
2021-09-28 17:42:25 +08:00
},
2022-06-01 17:25:41 +08:00
//邮箱配置信息
2021-09-28 17:42:25 +08:00
"MailOptions": {
2023-06-07 13:41:42 +08:00
//发件人名称
"FromName": "system",
2022-06-01 17:25:41 +08:00
//发送人邮箱
2023-06-07 13:41:42 +08:00
"FromEmail": "", //egxxxx@qq.com
2022-06-01 17:25:41 +08:00
//发送人邮箱密码
"Password": "",
2022-06-01 17:25:41 +08:00
//协议
2021-09-28 17:42:25 +08:00
"Smtp": "smtp.qq.com",
2022-07-01 20:01:40 +08:00
"Port": 587,
"Signature": "系统邮件,请勿回复!",
"UseSsl": true
2022-01-01 16:05:06 +08:00
},
2022-06-01 17:25:41 +08:00
//redis服务配置
2022-01-01 16:05:06 +08:00
"RedisServer": {
2023-03-08 13:02:38 +08:00
"open": 0, //是否启用redis
2022-01-01 16:05:06 +08:00
"Cache": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=cache:",
"Session": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=session:"
2022-04-04 18:53:02 +08:00
},
2022-06-01 17:25:41 +08:00
//接口请求限制
2022-04-04 18:53:02 +08:00
"IpRateLimiting": {
"EnableEndpointRateLimiting": true,
"StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
2022-07-12 21:12:52 +08:00
"EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut", "*:/common/uploadfile" ],
2022-04-04 18:53:02 +08:00
"QuotaExceededResponse": {
2022-06-01 17:25:41 +08:00
"Content": "{{\"code\":429,\"msg\":\"访问过于频繁,请稍后重试\"}}",
2022-04-04 18:53:02 +08:00
"ContentType": "application/json",
"StatusCode": 429
},
2022-06-01 17:25:41 +08:00
//通用规则api规则,结尾一定要带*
2022-04-04 18:53:02 +08:00
"GeneralRules": [
{
"Endpoint": "*:/captchaImage",
2022-06-01 17:25:41 +08:00
//时间段,格式:{数字}{单位}可使用单位s, m, h, d
2022-04-04 18:53:02 +08:00
"Period": "3s",
"Limit": 5
},
{
2022-10-25 07:51:35 +08:00
"Endpoint": "((post)|(put)):*",
2022-04-04 18:53:02 +08:00
"Period": "3s",
"Limit": 1
}
],
"IpRateLimitPolicies": {
2022-06-01 17:25:41 +08:00
//ip规则
2022-04-04 18:53:02 +08:00
"IpRules": [
]
}
2022-10-11 21:45:15 +08:00
},
//验证码配置
"CaptchaOptions": {
2023-03-15 16:00:16 +08:00
"IgnoreCase": true // 比较时是否忽略大小写
2021-08-23 16:57:25 +08:00
}
}