Skip to content

Commit

Permalink
✨ 调整
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonNoCry committed Jul 21, 2023
1 parent 4463f9f commit 6e136fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Blog.Core.Api.Controllers.Systems;

/// <summary>
/// 缓存管理
/// 动态建表 CURD
/// </summary>
[Route("api/Systems/[controller]/[action]")]
[ApiController]
Expand Down
30 changes: 14 additions & 16 deletions Blog.Core.Api/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@
"SvcName": "", // /svc/blog
"UseLoadTest": false
},

// 请配置MainDB为你想要的主库的ConnId值,并设置对应的Enabled为true;
// *** 单库操作,把 MutiDBEnabled 设为false ***;
// *** 多库操作,把 MutiDBEnabled 设为true,其他的从库Enabled也为true **;
// 具体配置看视频:https://www.bilibili.com/video/BV1BJ411B7mn?p=6
//Log:日志库;
"MainDB": "WMBLOG_MSSQL_1", //当前项目的主库,所对应的连接字符串的Enabled必须为true
"MainDB": "WMBLOG_SQLITE", //当前项目的主库,所对应的连接字符串的Enabled必须为true
"MutiDBEnabled": true, //是否开启多库模式
"CQRSEnabled": false, //是否开启读写分离模式,必须是单库模式,且数据库类型一致,比如都是SqlServer
"DBS": [
Expand All @@ -98,24 +99,23 @@
{
"ConnId": "WMBLOG_SQLITE",
"DBType": 2,
"Enabled": false,
"Enabled": true,
"HitRate": 50, // 值越大,优先级越高
"Connection": "WMBlog.db" //sqlite只写数据库名就行
},
{
"ConnId": "Log", //日志库连接固定名称,不要改,其他的可以改
"DBType": 1,
"DBType": 2,
"Enabled": true,
"HitRate": 50, // 值越大,优先级越高
"Connection": "Server=localhost;Database=BlogCoreLog;Trusted_Connection=True;",
"ProviderName": "System.Data.SqlClient"
"Connection": "WMBlogLog.db" //sqlite只写数据库名就行
},
{
"ConnId": "WMBLOG_MSSQL_1",
"DBType": 1,
"Enabled": true,
"Enabled": false,
"HitRate": 40,
"Connection": "Server=localhost;Database=BlogCore;Trusted_Connection=True;",
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMBLOG_MSSQL_1;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient"
},
{
Expand Down Expand Up @@ -257,16 +257,15 @@
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"IpWhitelist": [], //白名单
"EndpointWhitelist": ["get:/api/xxx", "*:/api/yyy"],
"ClientWhitelist": ["dev-client-1", "dev-client-2"],
"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规则,结尾一定要带*
"GeneralRules": [ //api规则,结尾一定要带*
{
"Endpoint": "*:/api/blog*",
"Period": "1m",
Expand All @@ -288,6 +287,7 @@
"Limit": 500
}
]

},
"ConsulSetting": {
"ServiceName": "BlogCoreService",
Expand All @@ -296,8 +296,7 @@
"ServiceHealthCheck": "/healthcheck",
"ConsulAddress": "http://localhost:8500"
},
"PayInfo": {
//建行聚合支付信息
"PayInfo": { //建行聚合支付信息
"MERCHANTID": "", //商户号
"POSID": "", //柜台号
"BRANCHID": "", //分行号
Expand All @@ -307,7 +306,7 @@
"OutAddress": "http://127.0.0.1:12345" //外联地址
},
"nacos": {
"ServerAddresses": ["http://localhost:8848"], // nacos 连接地址
"ServerAddresses": [ "http://localhost:8848" ], // nacos 连接地址
"DefaultTimeOut": 15000, // 默认超时时间
"Namespace": "public", // 命名空间
"ListenInterval": 10000, // 监听的频率
Expand All @@ -318,8 +317,7 @@
"LogFiedOutPutConfigs": {
"tcpAddressHost": "", // 输出elk的tcp连接地址
"tcpAddressPort": 0, // 输出elk的tcp端口号
"ConfigsInfo": [
// 配置的输出elk节点内容 常用语动态标识
"ConfigsInfo": [ // 配置的输出elk节点内容 常用语动态标识
{
"FiedName": "applicationName",
"FiedValue": "Blog.Core.Api"
Expand Down

0 comments on commit 6e136fe

Please sign in to comment.