chore 优化代码
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Ui.Branding;
|
||||
|
||||
namespace KonSoft.Shared.Hosting.AspNetCore
|
||||
namespace KonSoft.Shared.Hosting.AspNetCore;
|
||||
|
||||
[Dependency(ReplaceServices = true)]
|
||||
public class KonSoftBrandingProvider : DefaultBrandingProvider
|
||||
{
|
||||
[Dependency(ReplaceServices = true)]
|
||||
public class KonSoftBrandingProvider : DefaultBrandingProvider
|
||||
{
|
||||
public override string AppName => "KonSoft";
|
||||
}
|
||||
}
|
||||
public override string AppName => "KonSoft";
|
||||
}
|
||||
@ -5,28 +5,24 @@ using Volo.Abp.MultiTenancy;
|
||||
using Volo.Abp.Swashbuckle;
|
||||
using Volo.Abp.VirtualFileSystem;
|
||||
|
||||
namespace KonSoft.Shared.Hosting.AspNetCore
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(KonSoftSharedLocalizationModule),
|
||||
typeof(KonSoftSharedHostingModule),
|
||||
typeof(AbpAspNetCoreSerilogModule),
|
||||
typeof(AbpSwashbuckleModule),
|
||||
typeof(AbpMultiTenancyModule)
|
||||
)]
|
||||
public class KonSoftSharedHostingAspNetCoreModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpVirtualFileSystemOptions>(options =>
|
||||
{
|
||||
options.FileSets.AddEmbedded<KonSoftSharedHostingAspNetCoreModule>("KonSoft.Shared.Hosting.AspNetCore");
|
||||
});
|
||||
namespace KonSoft.Shared.Hosting.AspNetCore;
|
||||
|
||||
Configure<AbpMultiTenancyOptions>(options =>
|
||||
{
|
||||
options.IsEnabled = KonSoftConsts.MultiTenancyEnabled;
|
||||
});
|
||||
}
|
||||
[DependsOn(
|
||||
typeof(KonSoftSharedLocalizationModule),
|
||||
typeof(KonSoftSharedHostingModule),
|
||||
typeof(AbpAspNetCoreSerilogModule),
|
||||
typeof(AbpSwashbuckleModule),
|
||||
typeof(AbpMultiTenancyModule)
|
||||
)]
|
||||
public class KonSoftSharedHostingAspNetCoreModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpVirtualFileSystemOptions>(options =>
|
||||
{
|
||||
options.FileSets.AddEmbedded<KonSoftSharedHostingAspNetCoreModule>("KonSoft.Shared.Hosting.AspNetCore");
|
||||
});
|
||||
|
||||
Configure<AbpMultiTenancyOptions>(options => { options.IsEnabled = KonSoftConsts.MultiTenancyEnabled; });
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -18,10 +18,10 @@ public static class SwaggerConfigurationHelper
|
||||
)
|
||||
{
|
||||
context.Services.AddAbpSwaggerGenWithOidc(
|
||||
authority: authority,
|
||||
scopes: scopes,
|
||||
flows: flows,
|
||||
discoveryEndpoint: discoveryEndpoint,
|
||||
authority,
|
||||
scopes,
|
||||
flows,
|
||||
discoveryEndpoint,
|
||||
options =>
|
||||
{
|
||||
options.SwaggerDoc(apiName, new OpenApiInfo { Title = apiTitle, Version = apiVersion });
|
||||
|
||||
Reference in New Issue
Block a user