2020-07-06 20:20:53 +08:00
|
|
|
|
{
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"urls": "http://*:9291", //web服务端口,如果用IIS部署,把这个去掉
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Serilog": {
|
|
|
|
|
"MinimumLevel": {
|
|
|
|
|
"Default": "Debug",
|
|
|
|
|
"Override": {
|
|
|
|
|
"Microsoft": "Information",
|
|
|
|
|
"Microsoft.AspNetCore": "Warning",
|
|
|
|
|
"System": "Warning",
|
|
|
|
|
"System.Net.Http.HttpClient": "Warning",
|
|
|
|
|
"Hangfire": "Information",
|
|
|
|
|
"Magicodes": "Warning",
|
|
|
|
|
"DotNetCore.CAP": "Information",
|
|
|
|
|
"Savorboard.CAP": "Information",
|
|
|
|
|
"Quartz": "Information"
|
2019-04-08 15:54:01 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"AllowedHosts": "*",
|
2020-09-03 21:38:39 +08:00
|
|
|
|
"Redis": {
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Enable": false,
|
|
|
|
|
"ConnectionString": "127.0.0.1:6379",
|
|
|
|
|
"InstanceName": "" //前缀
|
2022-04-11 16:19:36 +08:00
|
|
|
|
},
|
|
|
|
|
"RabbitMQ": {
|
|
|
|
|
"Enabled": false,
|
|
|
|
|
"Connection": "118.25.251.13",
|
|
|
|
|
"UserName": "",
|
|
|
|
|
"Password": "!",
|
|
|
|
|
"RetryCount": 3
|
|
|
|
|
},
|
|
|
|
|
"Kafka": {
|
|
|
|
|
"Enabled": false,
|
|
|
|
|
"Servers": "localhost:9092",
|
|
|
|
|
"Topic": "blog",
|
|
|
|
|
"GroupId": "blog-consumer",
|
|
|
|
|
"NumPartitions": 3 //主题分区数量
|
|
|
|
|
},
|
|
|
|
|
"EventBus": {
|
|
|
|
|
"Enabled": false,
|
|
|
|
|
"SubscriptionClientName": "Blog.Core"
|
2020-09-03 21:38:39 +08:00
|
|
|
|
},
|
2019-04-08 15:54:01 +08:00
|
|
|
|
"AppSettings": {
|
2023-06-12 11:34:39 +08:00
|
|
|
|
"CachingAOP": {
|
2019-04-08 15:54:01 +08:00
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"LogToDb": true,
|
2019-10-02 22:27:15 +08:00
|
|
|
|
"LogAOP": {
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Enabled": false,
|
|
|
|
|
"LogToFile": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
|
|
|
|
"LogToDB": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
}
|
2019-10-02 22:27:15 +08:00
|
|
|
|
},
|
2019-11-07 18:14:34 +08:00
|
|
|
|
"TranAOP": {
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
|
|
|
|
"UserAuditAOP": {
|
2019-11-07 18:14:34 +08:00
|
|
|
|
"Enabled": false
|
|
|
|
|
},
|
2019-10-02 22:27:15 +08:00
|
|
|
|
"SqlAOP": {
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"Enabled": true,
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"LogToFile": {
|
|
|
|
|
"Enabled": true
|
2021-06-04 19:28:44 +08:00
|
|
|
|
},
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"LogToDB": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
|
|
|
|
"LogToConsole": {
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"Enabled": true
|
2021-06-04 19:28:44 +08:00
|
|
|
|
}
|
2019-04-08 15:54:01 +08:00
|
|
|
|
},
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"Date": "2018-08-28",
|
|
|
|
|
"SeedDBEnabled": true, //只生成表结构
|
|
|
|
|
"SeedDBDataEnabled": true, //生成表,并初始化数据
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"Author": "Blog.Core",
|
|
|
|
|
"SvcName": "", // /svc/blog
|
|
|
|
|
"UseLoadTest": false
|
2020-04-26 19:45:25 +08:00
|
|
|
|
},
|
|
|
|
|
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
//优化DB配置、不会再区分单库多库
|
|
|
|
|
//MainDb:标识当前项目的主库,所对应的连接字符串的Enabled必须为true
|
|
|
|
|
//Log:标识日志库,所对应的连接字符串的Enabled必须为true
|
|
|
|
|
//从库只需配置Slaves数组,要求数据库类型一致!,比如都是SqlServer
|
|
|
|
|
//
|
|
|
|
|
//新增,故障转移方案
|
|
|
|
|
//如果主库挂了,会自动切换到备用连接(比如说主库+备用库)
|
|
|
|
|
//备用连接的ConnId配置为主库的ConnId+数字即可,比如主库的ConnId为Main,那么备用连接的ConnId为Mian1
|
|
|
|
|
//主库、备用库无需数据库类型一致!
|
|
|
|
|
//备用库不会有程序维护,需要手动维护
|
|
|
|
|
"MainDB": "Main", //当前项目的主库,所对应的连接字符串的Enabled必须为true
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"DBS": [
|
|
|
|
|
/*
|
|
|
|
|
对应下边的 DBType
|
|
|
|
|
MySql = 0,
|
|
|
|
|
SqlServer = 1,
|
|
|
|
|
Sqlite = 2,
|
|
|
|
|
Oracle = 3,
|
2022-04-11 16:19:36 +08:00
|
|
|
|
PostgreSQL = 4,
|
|
|
|
|
Dm = 5,//达梦
|
|
|
|
|
Kdbndp = 6,//人大金仓
|
2020-04-26 19:45:25 +08:00
|
|
|
|
*/
|
|
|
|
|
{
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"ConnId": "Main",
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"DBType": 2,
|
2019-10-02 22:27:15 +08:00
|
|
|
|
"Enabled": true,
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Connection": "WMBlog.db", //sqlite只写数据库名就行
|
|
|
|
|
"Slaves": [
|
|
|
|
|
{
|
|
|
|
|
"HitRate": 0,// 值越大,优先级越高 0不使用
|
|
|
|
|
"Connection": "WMBlog2.db"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"ConnId": "Main2",
|
|
|
|
|
"DBType": 2,
|
|
|
|
|
"Enabled": true,
|
|
|
|
|
"Connection": "WMBlog3.db", //sqlite只写数据库名就行
|
|
|
|
|
"Slaves": [
|
|
|
|
|
{
|
|
|
|
|
"HitRate": 0,// 值越大,优先级越高 0不使用
|
|
|
|
|
"Connection": "WMBlog4.db"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"ConnId": "Log", //日志库连接固定名称,不要改,其他的可以改
|
|
|
|
|
"DBType": 2,
|
|
|
|
|
"Enabled": true,
|
|
|
|
|
"HitRate": 50,
|
|
|
|
|
"Connection": "WMBlogLog.db" //sqlite只写数据库名就行
|
2019-10-02 22:27:15 +08:00
|
|
|
|
},
|
2020-04-26 19:45:25 +08:00
|
|
|
|
{
|
|
|
|
|
"ConnId": "WMBLOG_MSSQL_1",
|
|
|
|
|
"DBType": 1,
|
2020-09-03 21:38:39 +08:00
|
|
|
|
"Enabled": false,
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMBLOG_MSSQL_1;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
|
2019-04-08 15:54:01 +08:00
|
|
|
|
"ProviderName": "System.Data.SqlClient"
|
|
|
|
|
},
|
2020-04-26 19:45:25 +08:00
|
|
|
|
{
|
|
|
|
|
"ConnId": "WMBLOG_MSSQL_2",
|
|
|
|
|
"DBType": 1,
|
2020-09-03 21:38:39 +08:00
|
|
|
|
"Enabled": false,
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMBLOG_MSSQL_2;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
|
|
|
|
|
"ProviderName": "System.Data.SqlClient"
|
2019-04-16 19:08:45 +08:00
|
|
|
|
},
|
2020-04-26 19:45:25 +08:00
|
|
|
|
{
|
|
|
|
|
"ConnId": "WMBLOG_MYSQL",
|
|
|
|
|
"DBType": 0,
|
2020-09-03 21:38:39 +08:00
|
|
|
|
"Enabled": false,
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Connection": "server=localhost;Database=blog;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;"
|
2020-09-03 21:38:39 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"ConnId": "WMBLOG_MYSQL_2",
|
|
|
|
|
"DBType": 0,
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Enabled": false,
|
|
|
|
|
"Connection": "server=localhost;Database=blogcore001;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;"
|
2020-04-26 19:45:25 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"ConnId": "WMBLOG_ORACLE",
|
|
|
|
|
"DBType": 3,
|
2019-10-02 22:27:15 +08:00
|
|
|
|
"Enabled": false,
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"Connection": "Data Source=127.0.0.1/ops;User ID=OPS;Password=123456;Persist Security Info=True;Connection Timeout=60;"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"ConnId": "WMBLOG_DM",
|
|
|
|
|
"DBType": 5,
|
|
|
|
|
"Enabled": false,
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Connection": "Server=xxxxx:5236;User Id=xxxxx;PWD=xxxxx;SCHEMA=TESTDBA;"
|
2022-04-11 16:19:36 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"ConnId": "WMBLOG_KDBNDP",
|
|
|
|
|
"DBType": 6,
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Enabled": false,
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"Connection": "Server=127.0.0.1;Port=54321;UID=SYSTEM;PWD=system;database=SQLSUGAR4XTEST1;"
|
2020-04-26 19:45:25 +08:00
|
|
|
|
}
|
|
|
|
|
],
|
2019-04-08 15:54:01 +08:00
|
|
|
|
"Audience": {
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"Secret": "sdfsdfsrty45634kkhllghtdgdfss345t678fs", //不要太短,16位+
|
|
|
|
|
"SecretFile": "C:\\my-file\\blog.core.audience.secret.txt", //安全。内容就是Secret
|
2019-04-08 15:54:01 +08:00
|
|
|
|
"Issuer": "Blog.Core",
|
|
|
|
|
"Audience": "wr"
|
2019-11-07 18:14:34 +08:00
|
|
|
|
},
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"Mongo": {
|
|
|
|
|
"ConnectionString": "mongodb://nosql.data",
|
|
|
|
|
"Database": "BlogCoreDb"
|
|
|
|
|
},
|
2019-11-07 18:14:34 +08:00
|
|
|
|
"Startup": {
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Domain": "http://localhost:9291",
|
2019-11-07 18:14:34 +08:00
|
|
|
|
"Cors": {
|
2020-09-03 21:38:39 +08:00
|
|
|
|
"PolicyName": "CorsIpAccess", //策略名称
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"EnableAllIPs": false, //当为true时,开放所有IP均可访问。
|
2020-09-03 21:38:39 +08:00
|
|
|
|
// 支持多个域名端口,注意端口号后不要带/斜杆:比如localhost:8000/,是错的
|
|
|
|
|
// 注意,http://127.0.0.1:1818 和 http://localhost:1818 是不一样的
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"IPs": "http://127.0.0.1:2364,http://localhost:2364,http://127.0.0.1:6688,http://localhost:6688"
|
2020-04-26 19:45:25 +08:00
|
|
|
|
},
|
|
|
|
|
"AppConfigAlert": {
|
|
|
|
|
"Enabled": true
|
2019-11-07 18:14:34 +08:00
|
|
|
|
},
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"ApiName": "Blog.Core",
|
|
|
|
|
"IdentityServer4": {
|
|
|
|
|
"Enabled": false, // 这里默认是false,表示使用jwt,如果设置为true,则表示系统使用Ids4模式
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"AuthorizationUrl": "http://localhost:5004", // 认证中心域名
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"ApiName": "blog.core.api" // 资源服务器
|
2020-09-03 21:38:39 +08:00
|
|
|
|
},
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Authing": {
|
|
|
|
|
"Enabled": false,
|
|
|
|
|
"Issuer": "https://uldr24esx31h-demo.authing.cn/oidc",
|
|
|
|
|
"Audience": "63d51c4205c2849803be5178",
|
|
|
|
|
"JwksUri": "https://uldr24esx31h-demo.authing.cn/oidc/.well-known/jwks.json"
|
|
|
|
|
},
|
2020-09-03 21:38:39 +08:00
|
|
|
|
"RedisMq": {
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"Enabled": false //redis 消息队列
|
|
|
|
|
},
|
|
|
|
|
"MiniProfiler": {
|
|
|
|
|
"Enabled": false //性能分析开启
|
|
|
|
|
},
|
|
|
|
|
"Nacos": {
|
|
|
|
|
"Enabled": false //Nacos注册中心
|
2020-04-26 19:45:25 +08:00
|
|
|
|
}
|
2019-11-07 18:14:34 +08:00
|
|
|
|
},
|
|
|
|
|
"Middleware": {
|
|
|
|
|
"RequestResponseLog": {
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Enabled": true,
|
|
|
|
|
"LogToFile": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
|
|
|
|
"LogToDB": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
}
|
2020-04-26 19:45:25 +08:00
|
|
|
|
},
|
|
|
|
|
"IPLog": {
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Enabled": true,
|
|
|
|
|
"LogToFile": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
|
|
|
|
"LogToDB": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
}
|
2019-11-07 18:14:34 +08:00
|
|
|
|
},
|
2020-07-06 20:20:53 +08:00
|
|
|
|
"RecordAccessLogs": {
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"Enabled": true,
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"LogToFile": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
|
|
|
|
"LogToDB": {
|
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"IgnoreApis": "/api/permission/getnavigationbar,/api/monitor/getids4users,/api/monitor/getaccesslogs,/api/monitor/server,/api/monitor/getactiveusers,/api/monitor/server,"
|
2020-04-26 19:45:25 +08:00
|
|
|
|
},
|
|
|
|
|
"SignalR": {
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
"Enabled": true
|
|
|
|
|
},
|
|
|
|
|
"SignalRSendLog": {
|
|
|
|
|
"Enabled": true
|
2020-06-11 13:52:54 +08:00
|
|
|
|
},
|
|
|
|
|
"QuartzNetJob": {
|
|
|
|
|
"Enabled": true
|
2020-06-17 15:45:24 +08:00
|
|
|
|
},
|
|
|
|
|
"Consul": {
|
|
|
|
|
"Enabled": false
|
|
|
|
|
},
|
|
|
|
|
"IpRateLimit": {
|
|
|
|
|
"Enabled": true
|
2019-11-07 18:14:34 +08:00
|
|
|
|
}
|
2020-04-26 19:45:25 +08:00
|
|
|
|
},
|
|
|
|
|
"IpRateLimiting": {
|
2020-06-11 13:52:54 +08:00
|
|
|
|
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
|
|
|
|
|
"StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"RealIpHeader": "X-Real-IP",
|
|
|
|
|
"ClientIdHeader": "X-ClientId",
|
|
|
|
|
"IpWhitelist": [], //白名单
|
|
|
|
|
"EndpointWhitelist": [ "get:/api/xxx", "*:/api/yyy" ],
|
|
|
|
|
"ClientWhitelist": [ "dev-client-1", "dev-client-2" ],
|
2022-04-11 16:19:36 +08:00
|
|
|
|
"QuotaExceededResponse": {
|
|
|
|
|
"Content": "{{\"status\":429,\"msg\":\"访问过于频繁,请稍后重试\",\"success\":false}}",
|
|
|
|
|
"ContentType": "application/json",
|
|
|
|
|
"StatusCode": 429
|
|
|
|
|
},
|
2020-04-26 19:45:25 +08:00
|
|
|
|
"HttpStatusCode": 429, //返回状态码
|
|
|
|
|
"GeneralRules": [ //api规则,结尾一定要带*
|
|
|
|
|
{
|
|
|
|
|
"Endpoint": "*:/api/blog*",
|
|
|
|
|
"Period": "1m",
|
|
|
|
|
"Limit": 20
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"Endpoint": "*/api/*",
|
|
|
|
|
"Period": "1s",
|
|
|
|
|
"Limit": 3
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"Endpoint": "*/api/*",
|
|
|
|
|
"Period": "1m",
|
|
|
|
|
"Limit": 30
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"Endpoint": "*/api/*",
|
|
|
|
|
"Period": "12h",
|
|
|
|
|
"Limit": 500
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
2020-06-14 22:41:27 +08:00
|
|
|
|
},
|
|
|
|
|
"ConsulSetting": {
|
|
|
|
|
"ServiceName": "BlogCoreService",
|
|
|
|
|
"ServiceIP": "localhost",
|
2021-08-24 15:21:25 +08:00
|
|
|
|
"ServicePort": "9291",
|
2020-06-14 22:41:27 +08:00
|
|
|
|
"ServiceHealthCheck": "/healthcheck",
|
|
|
|
|
"ConsulAddress": "http://localhost:8500"
|
2022-04-11 16:19:36 +08:00
|
|
|
|
},
|
|
|
|
|
"PayInfo": { //建行聚合支付信息
|
|
|
|
|
"MERCHANTID": "", //商户号
|
|
|
|
|
"POSID": "", //柜台号
|
|
|
|
|
"BRANCHID": "", //分行号
|
|
|
|
|
"pubKey": "", //公钥
|
|
|
|
|
"USER_ID": "", //操作员号
|
|
|
|
|
"PASSWORD": "", //密码
|
|
|
|
|
"OutAddress": "http://127.0.0.1:12345" //外联地址
|
|
|
|
|
},
|
|
|
|
|
"nacos": {
|
|
|
|
|
"ServerAddresses": [ "http://localhost:8848" ], // nacos 连接地址
|
|
|
|
|
"DefaultTimeOut": 15000, // 默认超时时间
|
|
|
|
|
"Namespace": "public", // 命名空间
|
|
|
|
|
"ListenInterval": 10000, // 监听的频率
|
|
|
|
|
"ServiceName": "blog.Core.Api", // 服务名
|
|
|
|
|
"Port": "9291", // 服务端口号
|
|
|
|
|
"RegisterEnabled": true // 是否直接注册nacos
|
|
|
|
|
},
|
|
|
|
|
"LogFiedOutPutConfigs": {
|
|
|
|
|
"tcpAddressHost": "", // 输出elk的tcp连接地址
|
|
|
|
|
"tcpAddressPort": 0, // 输出elk的tcp端口号
|
|
|
|
|
"ConfigsInfo": [ // 配置的输出elk节点内容 常用语动态标识
|
|
|
|
|
{
|
|
|
|
|
"FiedName": "applicationName",
|
|
|
|
|
"FiedValue": "Blog.Core.Api"
|
|
|
|
|
}
|
|
|
|
|
]
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
},
|
|
|
|
|
"Seq": {
|
|
|
|
|
"Enabled": true,
|
|
|
|
|
"Address": "http://localhost:5341/",
|
|
|
|
|
"ApiKey": ""
|
2019-04-08 15:54:01 +08:00
|
|
|
|
}
|
🎨✨🎉 优化原有的DBS配置、新增数据库故障转移方案
1.优化原有的DBS配置,破坏性修改,原有的DBS配置在多库和读写分离无法兼容,配置写法不是合适,故此优化
2.新增数据库故障转移方案,例如主库挂了自动切换到备用库,备用库不会由程序维护,需要运维、dba去做数据库同步方案,比如Sqlserver事务日志传输等
故障转移方案兼容多种方式
1.数据库主从方案
在配置主从之后,需要将从库配置为备用链接就行了
一般就是:修改、写入、删除走主库,查询操作走从库,在主库挂了后则所有操作走从库
2.数据库主备方案
日常使用主数据库操作,备用库只是备份,只有主库挂了才会用备用库
从库和备库都属于slave库功能
2023-10-19 16:28:20 +08:00
|
|
|
|
}
|