You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
8.8 KiB
JSON

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"urls": "http://*:30819", //web服务端口如果用IIS部署把这个去掉
"AllowedHosts": "*",
"Startup": {
"Domain": "http://60.209.125.238:30819",
"WorkerId": 12,
"Cors": {
"PolicyName": "CorsIpAccess", //策略名称
"EnableAllIPs": true, //当为true时开放所有IP均可访问。
// 支持多个域名端口,注意端口号后不要带/斜杆比如localhost:8000/是错的另外http://127.0.0.1:1818 和 http://localhost:1818 是不一样的
"IPs": "http://127.0.0.1:2364,http://localhost:2364,http://127.0.0.1:6688,http://localhost:6688"
},
"AppConfigAlert": {
"Enabled": true
},
"ApiName": "EntrustSettle",
"IdentityServer4": {
"Enabled": true, // 这里默认是false表示使用jwt授权模式如果设置为true则表示系统使用Ids4模式
"AuthorizationUrl": "http://60.209.125.238:40501", // 认证中心域名
"ApiName": "(未验证Audience)" // 资源服务器
},
"RedisMq": {
"Enabled": false //redis 消息队列
},
"UserInfoCacheTime": 60, //用户信息缓存时间,单位:分钟
// 可以查看所有数据的用户Gid列表
"SeeAllDataUserGids": [
"67233107-0db0-425c-9f14-5498d3cdd8b9", // 衣国豪
"d85fd590-d9f6-4410-93a1-f6fac77b606e" // 邹文坤
]
},
"Apis": {
"Hyd": {
"BaseUrl": "http://testapi.sdlandsea.net",
"LoginUrl": "/ypcd/login?key=aa8ac77919564a2ea5b99a2cacbc2f3c",
"QueryUrl": "/porto/getPortList?key=143423f94c2f4427a740bd3fa701b8b9",
"SubmitUrl": "/porto/saveWhole?key=143423f94c2f4427a740bd3fa701b8b9",
"FeedbackUrl": "/porto/sendFeedback?key=143423f94c2f4427a740bd3fa701b8b9",
"username": "dajianyun",
"password": "BLE8HHOFCPU8I5qgLB+FjdOj/gX32D8sHsAHk/tN0cgFhx0XfixoDrvNmhjhi9XSs+V6suodyIYSiRwACya1IA==",
"CUSTOMER": "687489",
"TokenCacheTime": 120 //token缓存时间单位
}
},
// Jwt授权模式需要配置IdentityServer4模式不需要配置
"Audience": {
"Secret": "sdfsdfsrty45634kkhllghtdgdfss345t678fs", //不要太短16位+
"SecretFile": "C:\\my-file\\entrust.settle.audience.secret.txt", //安全。内容就是Secret
"Issuer": "EntrustSettle",
"Audience": "wr"
},
"Middleware": {
"RequestResponseLog": {
"Enabled": true,
"IgnoreRequestApis": "/api/Annex/Upload,/api/Open/AnnexUpload",
"IgnoreResponseApis": "/api/Annex/DownloadFile,/api/Annex/Download,/api/Open/AnnexDownload",
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": false
}
},
"RecordAccessLogs": {
"Enabled": false,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": false
},
"IgnoreApis": "/api/Annex/Upload,/api/Open/AnnexUpload,/api/Annex/DownloadFile,/api/Annex/Download,/api/Open/AnnexDownload"
},
"SignalR": {
"Enabled": false
},
"SignalRSendLog": {
"Enabled": false
},
"IpRateLimit": {
"Enabled": false
},
"EncryptionResponse": {
"Enabled": false,
"AllApis": false,
"LimitApis": [
"/api/Login/GetJwtTokenSecret"
]
},
"EncryptionRequest": {
"Enabled": false,
"AllApis": false,
"LimitApis": [
"/api/Login/GetJwtTokenSecret"
]
}
},
"AppSettings": {
// 是否将日志记录到库中的总开关包括Sql日志、业务日志
"LogToDb": false,
// 服务层AOP日志
"ServiceAOPLog": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": false
}
},
// Sql执行日志
"SqlAOPLog": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToConsole": {
"Enabled": false
},
"LogToDB": {
"Enabled": false
}
},
// 缓存
"CachingAOP": {
"Enabled": true
},
// 事务
"TranAOP": {
"Enabled": true
},
"SeedDBEnabled": false, //生成表结构
"RoutePrefix": "", //路由变量前缀配置
},
// DBType对应0=MySql,1=SqlServer,2=Sqlite,3=Oracle,4=PostgreSQL,5=Dm,6=Kdbndp
//
// 主数据库MainDb标识当前项目的主数据库。相应连接字符串中的“Enabled”标志必须设置为“true”。
// 从库Slaves确保数据库类型一致。可用于读写分离。
// 日志数据库Log用于日志记录的数据库。相应连接字符串中的“Enabled”标志必须设置为“true”。
//
// 故障转移方案:
// 如果主数据库发生故障将自动切换到备用连接。备用连接的“ConnId”应配置为主数据库的“ConnId”加上一个数字。
// 例如如果主数据库的“ConnId”为“Main”那么备用连接的“ConnId”将为“Main1”。
// 主数据库和备用数据库不需要是相同类型。备用数据库将不由程序维护,需要手动维护。
"MainDB": "Main",
"DBS": [
{
"ConnId": "Main",
"DBType": 0,
"Enabled": true,
"Connection": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;Database=EntrustSettle;Uid=rulesengine_admin;Pwd=Rule1qaz2wsx!QAZ;Port=3306;Allow User Variables=True;Charset=utf8;TreatTinyAsBoolean=false;",
"Slaves": [
{
"HitRate": 0, // 值越大,优先级越高 0不使用
"Connection": "server=localhost;Database=(unused);Uid=root;Pwd=qwer1234;Port=3306;Allow User Variables=True;Charset=utf8;TreatTinyAsBoolean=false;"
}
]
},
{
"ConnId": "Main2",
"DBType": 2,
"Enabled": false,
"Connection": "(unused).db",
"Slaves": [
{
"HitRate": 0, // 值越大,优先级越高 0不使用
"Connection": "(unused).db"
}
]
},
{
"ConnId": "Log", //日志库连接固定名称,不可更改
"DBType": 0,
"Enabled": true,
"HitRate": 50,
"Connection": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;Database=EntrustSettleLog;Uid=rulesengine_admin;Pwd=Rule1qaz2wsx!QAZ;Port=3306;Allow User Variables=True;"
},
{
"ConnId": "PingTai",
"DBType": 1,
"Enabled": true,
"Connection": "Data Source =192.168.1.86,6333; Initial Catalog=TestDsPingTai; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true"
},
{
"ConnId": "BillTrace",
"DBType": 1,
"Enabled": true,
"Connection": "Data Source =60.209.125.238,32009; Initial Catalog=TestBillTrace; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true"
//"Connection": "Data Source =47.104.73.97,6762; Initial Catalog=BillTrace; Persist Security Info=True; User ID =sa; Password=QDdjy#2020*;pooling=true"
}
],
"Mongo": {
"ConnectionString": "mongodb://nosql.data",
"Database": "BlogCoreDb"
},
"IpRateLimiting": {
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
"StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"IpWhitelist": [], //白名单
"EndpointWhitelist": [ "get:/api/xxx", "*:/api/yyy" ],
"ClientWhitelist": [ "dev-client-1", "dev-client-2" ],
"QuotaExceededResponse": {
"Content": "{{\"status\":429,\"msg\":\"访问过于频繁,请稍后重试\",\"success\":false}}",
"ContentType": "application/json",
"StatusCode": 429
},
"HttpStatusCode": 429, //返回状态码
"GeneralRules": [ //api规则,结尾一定要带*
{
"Endpoint": "*:/api/entrust*",
"Period": "1m",
"Limit": 20
},
{
"Endpoint": "*/api/*",
"Period": "1s",
"Limit": 3
},
{
"Endpoint": "*/api/*",
"Period": "1m",
"Limit": 30
},
{
"Endpoint": "*/api/*",
"Period": "12h",
"Limit": 500
}
]
},
// Quartz版的定时任务
"QuartzNetJob": {
"Enabled": true
},
// 简易版的定时任务
"TimedJob": {
"Enabled": false
},
"Redis": {
"Enabled": true,
"ConnectionString": "127.0.0.1:6379,defaultDatabase=3",
"InstanceName": "" //Key前缀
},
"RabbitMQ": {
"Enabled": true,
"ConnectionString": "amqp://entrust_settle_user:djy^2024@60.209.125.238:40101/entrust_settle"
//"Connection": "60.209.125.238:40101/audit_booking",
//"UserName": "audit_booking_user",
//"Password": "djy^2024",
//"RetryCount": 3
},
"Kafka": {
"Enabled": false,
"Servers": "localhost:9092",
"Topic": "entrustsettle",
"GroupId": "entrustsettle-consumer",
"NumPartitions": 3 //主题分区数量
},
"EventBus": {
"Enabled": false,
"SubscriptionClientName": "EntrustSettle"
}
}