初始化db新增配置是否启动
This commit is contained in:
parent
f3b417a522
commit
6c31771605
@ -1,6 +1,8 @@
|
|||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
|
using Infrastructure.Helper;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using SqlSugar.IOC;
|
using SqlSugar.IOC;
|
||||||
|
using System.Reflection;
|
||||||
using ZR.Admin.WebApi.Framework;
|
using ZR.Admin.WebApi.Framework;
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
|
|
||||||
|
|||||||
@ -81,8 +81,12 @@ builder.Services.AddMvc(options =>
|
|||||||
builder.Services.AddSwaggerConfig();
|
builder.Services.AddSwaggerConfig();
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
//InternalApp.ServiceProvider = app.Services;
|
if (builder.Configuration["InitDb"].ParseToBool() == true)
|
||||||
//app.Services.InitDb();
|
{
|
||||||
|
InternalApp.ServiceProvider = app.Services;
|
||||||
|
app.Services.InitDb();
|
||||||
|
}
|
||||||
|
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
|
|
||||||
//使可以多次多去body内容
|
//使可以多次多去body内容
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
|
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
|
||||||
"Expire": 1440 //jwt登录过期时间(分)
|
"Expire": 1440 //jwt登录过期时间(分)
|
||||||
},
|
},
|
||||||
|
"InitDb": false,//是否初始化db
|
||||||
"DemoMode": false, //是否演示模式
|
"DemoMode": false, //是否演示模式
|
||||||
"Upload": {
|
"Upload": {
|
||||||
"UploadUrl": "http://localhost:8888", //本地存储资源访问路径
|
"UploadUrl": "http://localhost:8888", //本地存储资源访问路径
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user