You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.3 KiB
65 lines
2.3 KiB
{
|
|
"DbConnection": {
|
|
"ConnectionConfigs": [
|
|
{
|
|
"ConfigId": "Cis",
|
|
"DbType": "MySql", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access
|
|
"ConnectionString": "Data Source=192.168.1.119;port=3306;User ID=root;Password=123456;Database=Cis;pooling=true;sslmode=none;CharSet=utf8;",
|
|
//"DbType": "Sqlite",
|
|
//"ConnectionString": "DataSource=./cis.db",
|
|
//"DbType": "PostgreSQL",
|
|
//"ConnectionString": "HOST=127.0.0.1;PORT=5432;USER ID=pgsql;PASSWORD=123456;DATABASE=cis;",
|
|
"EnableInitDb": false // 启用库表初始化
|
|
}
|
|
]
|
|
},
|
|
"Redis": {
|
|
"ConnectionString": "192.168.1.119:6379,password=123456,defaultDatabase=2"
|
|
},
|
|
"AppSettings": {
|
|
"InjectSpecificationDocument": true // 生产环境是否开启Swagger
|
|
},
|
|
"SpecificationDocumentSettings": {
|
|
"DocumentTitle": "Swagger", //默认标题
|
|
"DefaultGroupName": "Default" //默认分组名称
|
|
},
|
|
"DynamicApiControllerSettings": {
|
|
"DefaultRoutePrefix": "api", //默认路由前缀
|
|
"KeepVerb": true, //是否保留动作谓词
|
|
"KeepName": true, //是否保留默认名称
|
|
"LowercaseRoute": false, //小写路由格式
|
|
"AsLowerCamelCase": true, //启用小驼峰命名(首字母小写)
|
|
"UrlParameterization": true // 方法参数
|
|
},
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Information",
|
|
"Microsoft.AspNetCore": "Warning"
|
|
},
|
|
"File": {
|
|
"Enabled": true, // 启用文件日志
|
|
"FileName": "logs/{0:yyyyMMdd}_{1}.log", // 日志文件
|
|
"Append": true, // 追加覆盖
|
|
// "MinimumLevel": "Information", // 日志级别
|
|
"FileSizeLimitBytes": 10485760, // 10M=10*1024*1024
|
|
"MaxRollingFiles": 30 // 只保留30个文件
|
|
},
|
|
"Monitor": {
|
|
"GlobalEnabled": true, // 启用全局拦截日志
|
|
"IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效
|
|
"ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效
|
|
"BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别
|
|
"WithReturnValue": true, // 配置是否包含返回值,默认true
|
|
"ReturnValueThreshold": 0 // 配置返回值字符串阈值,默认0全量输出
|
|
}
|
|
},
|
|
"SnowId": {
|
|
"WorkerId": 5 // 取值范围0~63,默认1
|
|
},
|
|
"CorsAccessorSettings": {
|
|
"WithExposedHeaders": [
|
|
"access-token",
|
|
"x-access-token"
|
|
]
|
|
}
|
|
}
|