Browse Source

更新连接地址

master
fyf 2 years ago
parent
commit
65897bd781
2 changed files with 2 additions and 5 deletions
  1. +0
    -4
      DataVAPI/AppConfig/AppConfigurtaionServices.cs
  2. +2
    -1
      DataVAPI/Startup.cs

+ 0
- 4
DataVAPI/AppConfig/AppConfigurtaionServices.cs View File

@@ -16,10 +16,6 @@ namespace DataVAPI.AppConfig
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
.Add(new JsonConfigurationSource { Path = "appsettings.json", ReloadOnChange = true })
.Build();

DataBus.connStr = Configuration.GetSection("mongoDB:connStr").Value;
DataBus.dbName = Configuration.GetSection("mongoDB:dbName").Value;

}
}
}

+ 2
- 1
DataVAPI/Startup.cs View File

@@ -25,7 +25,8 @@ namespace DataVAPI
public void ConfigureServices(IServiceCollection services)
{
SugarDb.Conn = Configuration["DbConnectionstring"].ToString();

DataBus.connStr = Configuration["mongoDB.connStr"].ToString();
DataBus.dbName = Configuration["mongoDB.dbName"].ToString();
//注册swagger服务
services.AddSwaggerUp();
services.AddControllers();


Loading…
Cancel
Save