shgx_tz_mom/ZR.Admin.WebApi/appsettings.production.json

165 lines
5.5 KiB
JSON
Raw Normal View History

2024-02-19 09:23:41 +08:00
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
2024-03-13 11:34:36 +08:00
"urls": "http://0.0.0.0:8888", //app会默认去读项目启动url如果改动端口前端对应devServer也需要进行修改
2024-02-19 09:23:41 +08:00
"dbConfigs": [
{
//"Conn": "Data Source=147.116.122.230;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
//"Conn": "Data Source=47.116.122.230;Port=3307;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
2025-05-26 16:25:46 +08:00
//"Conn": "Data Source=192.168.60.251;Port=3306;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
"Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=ZrAdmin;Port=3308",
2024-02-19 09:23:41 +08:00
"DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
"ConfigId": "0", //多租户唯一标识
"IsAutoCloseConnection": true
}
//...下面添加更多的数据库源
],
//代码生成数据库配置
"CodeGenDbConfig": {
//代码生成连接字符串,注意{dbName}为固定格式,不要填写数据库名
"Conn": "Data Source=139.224.232.211;User ID=root;Password=123456;Initial Catalog={dbName};",
2024-02-19 09:23:41 +08:00
"DbType": 0,
"IsAutoCloseConnection": true,
"DbName": "ZrAdmin" //代码生成默认连接数据库
},
2024-05-16 09:30:54 +08:00
2025-12-09 14:05:12 +08:00
"corsUrls": [ "http://localhost:8887", "http://localhost:8888", "http://192.168.60.251:8877" ], //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开
2024-02-19 09:23:41 +08:00
"JwtSettings": {
"Issuer": "ZRAdmin.NET", //即token的签发者。
"Audience": "ZRAdmin.NET", //指该token是服务于哪个群体的群体范围
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
2024-03-13 12:17:22 +08:00
"Expire": 10080 //jwt登录过期时间【7天】
2024-02-19 09:23:41 +08:00
},
"InjectClass": [ "ZR.Repository", "ZR.Service", "ZR.Tasks" ], //自动注入类
"ShowDbLog": false, //是否打印db日志
2024-02-19 09:23:41 +08:00
"InitDb": false, //是否初始化db
"DemoMode": false, //是否演示模式
2025-12-09 14:05:12 +08:00
"Upload": {
"uploadUrl": "http://localhost:8888", //本地存储资源访问路径
"localSavePath": "", //本地上传默认文件存储目录 wwwroot
"maxSize": 15, //上传文件大小限制 15M
"notAllowedExt": [ ".bat", ".exe", ".jar", ".js" ]
},
2024-02-19 09:23:41 +08:00
//阿里云存储配置
"ALIYUN_OSS": {
"REGIONID": "", //egcn-hangzhou
"KEY": "XX",
"SECRET": "XX",
"bucketName": "bucketName",
"domainUrl": "http://xxx.xxx.com", //访问资源域名
"maxSize": 100 //上传文件大小限制 100M
},
//企业微信通知配置
"WxCorp": {
"AgentID": "1",
"CorpID": "1",
"CorpSecret": "1",
"SendUser": "@all"
},
//微信公众号设置
"WxOpen": {
"AppID": "",
"AppSecret": ""
},
//代码生成配置
"gen": {
//是否显示移动端代码生成
"showApp": false,
//自动去除表前缀
"autoPre": true,
"author": "admin",
"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" ]
}
},
//邮箱配置信息
"MailOptions": {
//发件人名称
"FromName": "system",
//发送人邮箱
"FromEmail": "", //egxxxx@qq.com
//发送人邮箱密码
"Password": "",
//协议
"Smtp": "smtp.qq.com",
"Port": 587,
"Signature": "系统邮件,请勿回复!",
"UseSsl": true
},
//redis服务配置
"RedisServer": {
"open": 0, //是否启用redis
"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:"
},
//接口请求限制
"IpRateLimiting": {
"EnableEndpointRateLimiting": true,
"StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
"EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut", "*:/common/uploadfile" ],
"QuotaExceededResponse": {
"Content": "{{\"code\":429,\"msg\":\"访问过于频繁,请稍后重试\"}}",
"ContentType": "application/json",
"StatusCode": 429
},
//通用规则api规则,结尾一定要带*
"GeneralRules": [
{
"Endpoint": "*:/captchaImage",
//时间段,格式:{数字}{单位}可使用单位s, m, h, d
"Period": "3s",
"Limit": 5
},
{
"Endpoint": "((post)|(put)):*",
"Period": "3s",
"Limit": 1
}
],
"IpRateLimitPolicies": {
//ip规则
"IpRules": [
]
}
},
//验证码配置
"CaptchaOptions": {
"IgnoreCase": true // 比较时是否忽略大小写
},
"MqttConfig": {
"ClientId": "shgg-mes-server",
"Server": "192.168.23.165",
"Port": 1883,
"Username": "admin",
"Password": "123456",
"Topics": [
{
"Topic": "devices/#",
"QualityOfServiceLevel": "AtLeastOnce"
},
{
"Topic": "system/alert",
"QualityOfServiceLevel": "AtLeastOnce"
}
]
2024-02-19 09:23:41 +08:00
}
}