You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
958 B
32 lines
958 B
namespace Lion.AbpPro
|
|
{
|
|
[DependsOn(
|
|
typeof(AbpSwashbuckleModule),
|
|
typeof(AbpAutofacModule))]
|
|
public class AbpProSharedHostingGatewayModule : AbpModule
|
|
{
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
ConfigureOcelot(context);
|
|
ConfigureHealthChecks(context);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ocelot配置
|
|
/// </summary>
|
|
private static void ConfigureOcelot(ServiceConfigurationContext context)
|
|
{
|
|
var configuration = context.Services.GetConfiguration();
|
|
context.Services.AddOcelot(configuration).AddConsul().AddPolly();
|
|
}
|
|
/// <summary>
|
|
/// 健康检查
|
|
/// </summary>
|
|
/// <param name="context"></param>
|
|
private void ConfigureHealthChecks(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.AddHealthChecks();
|
|
}
|
|
}
|
|
}
|