{ "urls": "http://*:6002", //web服务端口,如果用IIS部署,把这个去掉 "AllowedHosts": "*", "Startup": { "Domain": "http://localhost:6002", "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 //用户信息缓存时间,单位:分钟 }, "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" } }, // Jwt授权模式需要配置,IdentityServer4模式不需要配置 "Audience": { "Secret": "sdfsdfsrty45634kkhllghtdgdfss345t678fs", //不要太短,16位+ "SecretFile": "C:\\my-file\\entrust.settle.audience.secret.txt", //安全。内容就是Secret "Issuer": "EntrustSettle", "Audience": "wr" }, "Middleware": { "RequestResponseLog": { "Enabled": true, "IgnoreApis": "/api/Annex/Upload,/api/Annex/DownloadFile,/api/Annex/Download", "LogToFile": { "Enabled": true }, "LogToDB": { "Enabled": false } }, "IPLog": { "Enabled": true, "LogToFile": { "Enabled": true }, "LogToDB": { "Enabled": false } }, "RecordAccessLogs": { "Enabled": true, "LogToFile": { "Enabled": true }, "LogToDB": { "Enabled": false }, "IgnoreApis": "/api/Annex/Upload,/api/Annex/DownloadFile,/api/Annex/Download" }, "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": false, "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": "", //路由变量前缀配置 "UseLoadTest": false }, // 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 =60.209.125.238,32009; Initial Catalog=TestDsPingTai; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;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前缀 }, "EventBus": { "Enabled": false, "SubscriptionClientName": "EntrustSettle" }, "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 //主题分区数量 } }