Browse Source

fix(configuration): use context.Services.GetConfiguration()

pull/450/head
cKey 4 years ago
parent
commit
e497983f8a
  1. 4
      apps/vue/src/views/oss-management/objects/hooks/useObjects.ts
  2. 5
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs
  3. 1
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs
  4. 2
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs
  5. 2
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Properties/launchSettings.json
  6. 2
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
  7. 2
      aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs
  8. 2
      aspnet-core/services/LY.MicroService.identityServer/IdentityServerModule.cs

4
apps/vue/src/views/oss-management/objects/hooks/useObjects.ts

@ -28,7 +28,7 @@ export function useObjects() {
marker: '',
sorting: '',
skipCount: 0,
maxResultCount: 100,
maxResultCount: 1000,
}).then((res) => {
containers.value = res.containers;
});
@ -58,7 +58,7 @@ export function useObjects() {
encodingType: '',
sorting: '',
skipCount: 0,
maxResultCount: 100,
maxResultCount: 1000,
}).then((res) => {
const fs = res.objects
.filter((item) => item.isFolder)

5
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/LINGYUN/Abp/OssManagement/FileSystem/FileSystemOssContainer.cs

@ -394,8 +394,9 @@ namespace LINGYUN.Abp.OssManagement.FileSystem
}
DirectoryHelper.CreateIfNotExists(filePath);
// 目录也属于Oss对象,需要抽象的文件系统集合来存储
var fileSystemNames = Directory.GetFileSystemEntries(filePath);
int maxFilesCount = fileSystemNames.Length;
var fileSystemNames = string.Equals(request.Delimiter, "/")
? Directory.GetDirectories(filePath)
: Directory.GetFileSystemEntries(filePath);
// 排序所有文件与目录
Array.Sort(fileSystemNames, delegate (string x, string y)

1
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs

@ -91,7 +91,6 @@ public partial class BackendAdminHttpApiHostModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAlwaysAllowAuthorization();
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();

2
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs

@ -89,7 +89,7 @@ public partial class PlatformManagementHttpApiHostModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = hostingEnvironment.BuildConfiguration();
var configuration = context.Services.GetConfiguration();
ConfigureDbContext();
ConfigureJsonSerializer();

2
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Properties/launchSettings.json

@ -11,7 +11,7 @@
"LY.MicroService.PlatformManagement.HttpApi.Host": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30025",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"

2
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs

@ -85,7 +85,7 @@ namespace LY.MicroService.RealtimeMessage
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = hostingEnvironment.BuildConfiguration();
var configuration = context.Services.GetConfiguration();
ConfigureDbContext();
ConfigureJsonSerializer();

2
aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs

@ -69,7 +69,7 @@ public partial class IdentityServerHttpApiHostModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = hostingEnvironment.BuildConfiguration();
var configuration = context.Services.GetConfiguration();
ConfigureDbContext();
ConfigureJsonSerializer();

2
aspnet-core/services/LY.MicroService.identityServer/IdentityServerModule.cs

@ -83,7 +83,7 @@ public partial class IdentityServerModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = hostingEnvironment.BuildConfiguration();
var configuration = context.Services.GetConfiguration();
ConfigureDbContext();
ConfigureJsonSerializer();

Loading…
Cancel
Save