From 673830d6f7cd75113205fb7a4faa185d4a31c1b7 Mon Sep 17 00:00:00 2001
From: Coldairarrow <862520575@qq.com>
Date: Sun, 19 Apr 2020 17:18:34 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/Coldairarrow.Console/appsettings.json | 43 ++++++++++++++++---
.../01.Coldairarrow.Util.csproj | 3 +-
2 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/src/Coldairarrow.Console/appsettings.json b/src/Coldairarrow.Console/appsettings.json
index 2fbd4aa4..6cb458d9 100644
--- a/src/Coldairarrow.Console/appsettings.json
+++ b/src/Coldairarrow.Console/appsettings.json
@@ -1,13 +1,41 @@
{
- "Logging": {
- "LogLevel": {
- "Default": "Warning"
- }
+ "log": { //日志配置
+ "minlevel": "Verbose", //定义详见Serilog.Events.LogEventLevel
+ "console": {
+ "enabled": true
+ },
+ "debug": {
+ "enabled": true
+ },
+ "file": {
+ "enabled": true
+ },
+ "database": {
+ "enabled": true
+ },
+ "elasticsearch": {
+ "enabled": false,
+ "nodes": [ "http://localhost:9200/" ],
+ "indexformat": "logstash-{0:yyyy.MM.dd}"
+ },
+ "overrides": [ //重写日志输出级别
+ {
+ "source": "Microsoft.AspNetCore",
+ "minlevel": "Warning"
+ }
+ ]
},
+ "Cache": {
+ "CacheType": "Memory", //定义详见Coldairarrow.Util.CacheType
+ "RedisEndpoint": "127.0.0.1:6379" //Redis节点地址,定义详见 https://github.com/2881099/csredis
+ },
+ "LogicDelete": false, //是否开启逻辑删除,默认为物理删除
"AllowedHosts": "*",
+ "DatabaseType": "SqlServer", //默认数据库类型,定义详见EFCore.Sharding.DatabaseType
+ "ConnectionName": "BaseDb", //默认连接字符串名
"ConnectionStrings": {
//SQLServer
- "BaseDb": "Data Source=.;Initial Catalog=Colder.Admin.AntdVue;Integrated Security=True"
+ "BaseDb": "Data Source=.;Initial Catalog=Colder.Admin.AntdVue;Integrated Security=True;Pooling=true;"
//PostgreSQL
//"BaseDb": "SERVER=localhost;PORT=5432;DATABASE=Colder.Admin.AntdVue;USER ID=postgres;PASSWORD=postgres"
//MySQl
@@ -15,5 +43,8 @@
//Oracle
//"BaseDb": "Data Source=127.0.0.1/ORCL;User ID=COLDER.ADMIN.ANTDVUE;Password=123456;Connect Timeout=3"
},
- "WorkerId": 1 //机器Id
+ //雪花Id,,以进程为单位,不同进程数据中心Id和机器Id不能同时重复
+ "WorkerId": 1, //机器Id
+ "JWTSecret": "CpUTEdG30LPAQXxQ",
+ "WebRootUrl": "http://localhost:5000" //接口根地址
}
diff --git a/src/Coldairarrow.Util/01.Coldairarrow.Util.csproj b/src/Coldairarrow.Util/01.Coldairarrow.Util.csproj
index 87da4062..bd96919e 100644
--- a/src/Coldairarrow.Util/01.Coldairarrow.Util.csproj
+++ b/src/Coldairarrow.Util/01.Coldairarrow.Util.csproj
@@ -32,10 +32,9 @@
-
+
-