相关服务开启配置 app.json
"operation": {
"dimension": {
//维数据以 value name格式输出
"kv": true
},
"verifyApi": false, //接口合法性验证, 格式如 36位guid|有效时间戳
"defaultApp": "basis",
"userBehavior": true,
"userBehaviorDbType": "MySql",
"userFilter": true, //用户认证,特定用户访问特定接口
"userLog": true, //用户操作日志,
"opLogDbType": "MySql", //操作日志存储的数据库类别 MySql Oracle PostgreSql Sqlite Sqlserver
"trackLogDbType": "MySql", //业务和异常日志 File MySql Oracle PostgreSql Sqlite Sqlserver
"systemLog": true,
"browerMinute": 2,
"authExpires": 300, // 60,
"password": "abcd", //默认密码,
"sqlDebug": false, //数据库sql调试, operation
"analysisDebug": false //性能调试
},
根据业务进行分库存储,auth为平台已实现内置库,bt通常为项目{ownerId}标识
{ownerId}对应项目,如rg/bt
{password} 数据库密码
root数据库账号
localhost数据库地址
{
//权限核心库 必须
"ConnBo": {
"name": "ConnBo",
"databaseType": "MySql",
"providerName": "MySql.Data.MySqlClient",
"remark": "",
"read": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_bo;User Id=root;Password={password};charset=utf8"
],
"write": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_bo;User Id=root;Password={password};charset=utf8"
]
},
//操作记录日志库 必须
"ConnLog": {
"name": "ConnLog",
"databaseType": "MySql",
"providerName": "MySql.Data.MySqlClient",
"remark": "",
"read": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_bo;User Id=root;Password={password};charset=utf8"
],
"write": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_bo;User Id=root;Password={password};charset=utf8"
]
},
//用户行为日志
"ConnUserBehavior": {
"name": "ConnTrackLog",
"databaseType": "MySql",
"providerName": "MySql.Data.MySqlClient",
"remark": "",
"read": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_log_ub;User Id=root;Password={password};charset=utf8"
],
"write": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_log_ub;User Id=root;Password={password};charset=utf8"
]
},
//异常等日志信息
"ConnTrackLog": {
"name": "ConnTrackLog",
"databaseType": "MySql",
"providerName": "MySql.Data.MySqlClient",
"remark": "",
"read": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_log_track;User Id=root;Password={password};charset=utf8"
],
"write": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_log_track;User Id=root;Password={password};charset=utf8"
]
},
//操作添加、修改、删除日志 必须
"ConnOpLog": {
"name": "ConnOpLog",
"databaseType": "MySql",
"providerName": "MySql.Data.MySqlClient",
"remark": "",
"read": [
"Data Source=localhost;Initial Catalog={ownerId}_log_op;User Id=root;Password={password};charset=utf8"
],
"write": [
"Data Source=localhost;Initial Catalog={ownerId}_log_op;User Id=root;Password={password};charset=utf8"
]
},
//项目业务核心库
"ConnBt": {
"name": "ConnBt",
"databaseType": "MySql",
"providerName": "MySql.Data.MySqlClient",
"read": [
"Data Source=localhost;Initial Catalog={ownerId}_code_bs;User Id=root;Password={password};charset=utf8"
],
"write": [
"Data Source=localhost;Initial Catalog={ownerId}_code_bs;User Id=root;Password={password};charset=utf8"
]
},
//平台类别业务库
"ConnBs": {
"name": "ConnBs",
"databaseType": "MySql",
"providerName": "MySql.Data.MySqlClient",
"remark": "",
"read": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_bs;User Id=root;Password={password};charset=utf8"
],
"write": [
"Data Source=localhost;Initial Catalog={ownerId}_auth_bs;User Id=root;Password={password};charset=utf8"
]
},
//存储bridger 文件 临时缓存数据
"ConnCacheBridge": {
"databaseType": "Sqlite",
"name": "ConnCacheBridge",
"providerName": "Microsoft.Data.Sqlite",
"read": [
"Data Source=~/App_Data/DB/{ownerId}/{ownerId}_sub_push_bridge.db"
],
"write": [
"Data Source=~/App_Data/DB/{ownerId}/{ownerId}_sub_push_bridge.db"
]
},
//存储mapper 文件 临时缓存数据 必须
"ConnCacheMapper": {
"databaseType": "Sqlite",
"name": "ConnCacheBridge",
"providerName": "Microsoft.Data.Sqlite",
"read": [
"Data Source=~/App_Data/DB/{ownerId}/{ownerId}_sub_push_mapper.db"
],
"write": [
"Data Source=~/App_Data/DB/{ownerId}/{ownerId}_sub_push_mapper.db"
]
}
}
文档更新时间: 2021-08-07 13:45 作者:admin