|
|
@ -22,6 +22,7 @@ using Elight.Entity; |
|
|
|
using _24Hour; |
|
|
|
using _24Hour; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using _24Hour.Filter; |
|
|
|
using _24Hour.Filter; |
|
|
|
|
|
|
|
using Elight.Utility.Encrypt; |
|
|
|
|
|
|
|
|
|
|
|
#region builder |
|
|
|
#region builder |
|
|
|
|
|
|
|
|
|
|
@ -200,19 +201,15 @@ builder.Services.AddHttpClient<TwentySystemProxyClient>(opt => |
|
|
|
opt.BaseAddress = new Uri(Configuration.GetSection("CaseTwenty:SysAddress").Value); |
|
|
|
opt.BaseAddress = new Uri(Configuration.GetSection("CaseTwenty:SysAddress").Value); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
var mysqlconnstr = Configuration.GetSection("CaseTwenty:SysAddress").Value; |
|
|
|
|
|
|
|
var BaseAddress = Configuration.GetSection("ConnectionStrings:MySQLConnString").Value; |
|
|
|
|
|
|
|
Console.WriteLine($"Mysql Connstring : {mysqlconnstr}"); |
|
|
|
|
|
|
|
Console.WriteLine($"Mysql Connstring : {BaseAddress}"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//builder.Services.AddAuthorization(); |
|
|
|
//builder.Services.AddAuthorization(); |
|
|
|
builder.Services.AddHttpContextAccessor(); |
|
|
|
builder.Services.AddHttpContextAccessor(); |
|
|
|
builder.Services.AddScoped<WebSocketController>(); |
|
|
|
builder.Services.AddScoped<WebSocketController>(); |
|
|
|
builder.Services.TryAddSingleton<User, User>(); |
|
|
|
builder.Services.TryAddSingleton<User, User>(); |
|
|
|
builder.Services.TryAddSingleton<WriteSysLog, WriteSysLog>(); //WriteSysLog |
|
|
|
builder.Services.TryAddSingleton<WriteSysLog, WriteSysLog>(); //WriteSysLog |
|
|
|
builder.Services.AddScoped<SqlSugarClient>(sp => |
|
|
|
builder.Services.AddScoped<SqlSugarClient>(sp => |
|
|
|
{ |
|
|
|
{ |
|
|
|
var connectionString = Configuration.GetSection("ConnectionStrings:MySQLConnString").Value; |
|
|
|
var config = Configuration.GetSection("ConnectionStrings:MySQLConnString").Value; |
|
|
|
|
|
|
|
var connectionString = AES.Decrypt(config); |
|
|
|
var db = new SqlSugarClient(new ConnectionConfig |
|
|
|
var db = new SqlSugarClient(new ConnectionConfig |
|
|
|
{ |
|
|
|
{ |
|
|
|
ConnectionString = connectionString, |
|
|
|
ConnectionString = connectionString, |
|
|
|