feat 网关继承微服务Swagger
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using KonSoft.Shared.Hosting.AspNetCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.Modularity;
|
||||
|
||||
namespace KonSoft.Shared.Hosting.Gateways;
|
||||
@ -8,4 +9,14 @@ namespace KonSoft.Shared.Hosting.Gateways;
|
||||
)]
|
||||
public class KonSoftSharedHostingGatewaysModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
var configuration = context.Services.GetConfiguration();
|
||||
|
||||
context.Services.AddHttpForwarderWithServiceDiscovery();
|
||||
|
||||
context.Services.AddReverseProxy()
|
||||
.LoadFromConfig(configuration.GetSection("ReverseProxy"))
|
||||
.AddServiceDiscoveryDestinationResolver();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user