优化代码、数据库字符串连接

This commit is contained in:
不做码农
2023-06-04 16:43:35 +08:00
parent 2e39825b5c
commit cdd4b42f0a
7 changed files with 98 additions and 37 deletions

View File

@@ -6,10 +6,15 @@
"Microsoft.Hosting.Lifetime": "Information"
}
},
"ConnectionStrings": {
"conn_db": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=admin;Password=admin123;Initial Catalog=ZrAdmin;", //其他连接字符串请看官方文档
"conn_db_type": "1" //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
},
"dbConfigs": [
{
"Conn": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=admin;Password=admin123;Initial Catalog=ZrAdmin;",
"DbType": 1, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
"ConfigId": "0", //多租户唯一标识
"IsAutoCloseConnection": true
}
//...下面添加更多的数据库源
],
"urls": "http://localhost:8888", //项目启动url如果改动端口前端对应devServer也需要进行修改
"corsUrls": "http://localhost:8887", //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开
"JwtSettings": {
@@ -18,7 +23,7 @@
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
"Expire": 1440 //jwt登录过期时间
},
"InjectClass": [ "ZR.Repository", "ZR.Service", "ZR.Tasks" ],//自动注入类
"InjectClass": [ "ZR.Repository", "ZR.Service", "ZR.Tasks" ], //自动注入类
"InitDb": false, //是否初始化db
"DemoMode": false, //是否演示模式
"Upload": {
@@ -43,6 +48,7 @@
"CorpSecret": "",
"SendUser": "@all"
},
//代码生成配置
"gen": {
"conn": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=admin;Password=admin123;Initial Catalog=ZrAdmin;",
"dbType": 1, //MySql = 0, SqlServer = 1