mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-03 00:00:58 +08:00
33 lines
929 B
C#
33 lines
929 B
C#
|
|
using Microsoft.Extensions.DependencyInjection;
|
|||
|
|
using Volo.Abp.Autofac;
|
|||
|
|
using Volo.Abp.Http.Client;
|
|||
|
|
using Volo.Abp.Modularity;
|
|||
|
|
using Yi.Framework.Rbac.Application.Contracts;
|
|||
|
|
|
|||
|
|
namespace Yi.Abp.HttpApi.Client
|
|||
|
|
{
|
|||
|
|
[DependsOn(typeof(AbpHttpClientModule),
|
|||
|
|
typeof(AbpAutofacModule),
|
|||
|
|
|
|||
|
|
|
|||
|
|
typeof(YiFrameworkRbacApplicationContractsModule))]
|
|||
|
|
public class YiAbpHttpApiClientModule : AbpModule
|
|||
|
|
{
|
|||
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|||
|
|
{
|
|||
|
|
//创建动态客户端代理
|
|||
|
|
context.Services.AddHttpClientProxies(
|
|||
|
|
typeof(YiFrameworkRbacApplicationContractsModule).Assembly
|
|||
|
|
|
|||
|
|
);
|
|||
|
|
Configure<AbpRemoteServiceOptions>(options =>
|
|||
|
|
{
|
|||
|
|
options.RemoteServices.Default =
|
|||
|
|
new RemoteServiceConfiguration("http://localhost:19001");
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|