♻️ feat(新增): 环境变量配置
This commit is contained in:
parent
acb93ca2c9
commit
a5953af186
|
@ -35,6 +35,7 @@ public class EfCoreContext : DbContext
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||||
{
|
{
|
||||||
options.UseSqlServer(DbPath).AddInterceptors(new TransactionInterceptor());
|
options.UseSqlServer(DbPath).AddInterceptors(new TransactionInterceptor());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -2,14 +2,24 @@
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"http": {
|
"http": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": false,
|
"launchBrowser": true,
|
||||||
"launchUrl": "bunnyDocs",
|
"launchUrl": "http://localhost:8900/bunnyDocs",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"dotnetRunMessages": false,
|
"dotnetRunMessages": true,
|
||||||
"applicationUrl": "http://*:8900"
|
"applicationUrl": "http://*:8900"
|
||||||
},
|
},
|
||||||
|
"https": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "https://localhost:8848/bunnyDocs",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"applicationUrl": "https://*:8848"
|
||||||
|
},
|
||||||
"Container (Dockerfile)": {
|
"Container (Dockerfile)": {
|
||||||
"commandName": "Docker",
|
"commandName": "Docker",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
|
@ -22,7 +32,7 @@
|
||||||
"useSSL": true
|
"useSSL": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
"iisSettings": {
|
"iisSettings": {
|
||||||
"windowsAuthentication": false,
|
"windowsAuthentication": false,
|
||||||
"anonymousAuthentication": true,
|
"anonymousAuthentication": true,
|
||||||
|
|
|
@ -5,5 +5,27 @@
|
||||||
"Microsoft.AspNetCore": "Warning",
|
"Microsoft.AspNetCore": "Warning",
|
||||||
"Microsoft.EntityFrameworkCore": "Information"
|
"Microsoft.EntityFrameworkCore": "Information"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*",
|
||||||
|
"DataBase": {
|
||||||
|
"DataBaseConnection": "192.168.3.98;Initial Catalog=BunnyDemo;TrustServerCertificate=True;Persist Security Info=True;User ID=sa;Password=abc1234.",
|
||||||
|
"TimeOut": 6
|
||||||
|
},
|
||||||
|
"JWT": {
|
||||||
|
"Issuer": "Issuer",
|
||||||
|
"Audience": "Audience"
|
||||||
|
},
|
||||||
|
"Redis": {
|
||||||
|
"Host": "47.120.65.66",
|
||||||
|
"Port": "6379",
|
||||||
|
"Password": "02120212",
|
||||||
|
"DefaultDB": 6,
|
||||||
|
"AsyncTimeout": 300
|
||||||
|
},
|
||||||
|
"Minio": {
|
||||||
|
"Url": "192.168.3.98:9000",
|
||||||
|
"AccessKey": "bunny",
|
||||||
|
"SecretKey": "02120212",
|
||||||
|
"BucketName": "csharp-test"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning",
|
||||||
|
"Microsoft.EntityFrameworkCore": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*",
|
||||||
|
"DataBase": {
|
||||||
|
"DataBaseConnection": "192.168.3.98;Initial Catalog=BunnyDemo;TrustServerCertificate=True;Persist Security Info=True;User ID=sa;Password=abc1234.",
|
||||||
|
"TimeOut": 6
|
||||||
|
},
|
||||||
|
"JWT": {
|
||||||
|
"Issuer": "Issuer",
|
||||||
|
"Audience": "Audience"
|
||||||
|
},
|
||||||
|
"Redis": {
|
||||||
|
"Host": "47.120.65.66",
|
||||||
|
"Port": "6379",
|
||||||
|
"Password": "02120212",
|
||||||
|
"DefaultDB": 6,
|
||||||
|
"AsyncTimeout": 300
|
||||||
|
},
|
||||||
|
"Minio": {
|
||||||
|
"Url": "192.168.3.98:9000",
|
||||||
|
"AccessKey": "bunny",
|
||||||
|
"SecretKey": "02120212",
|
||||||
|
"BucketName": "csharp-test"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue