feat:搭建yi-abp tool框架
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.Abp.Tool.Application.Contracts\Yi.Abp.Tool.Application.Contracts.csproj" />
|
||||
|
||||
<PackageReference Include="Volo.Abp.Http.Client" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,27 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.Autofac;
|
||||
using Volo.Abp.Http.Client;
|
||||
using Yi.Abp.Tool.Application.Contracts;
|
||||
|
||||
namespace Yi.Abp.Tool.HttpApi.Client
|
||||
{
|
||||
[DependsOn(typeof(AbpHttpClientModule),
|
||||
typeof(AbpAutofacModule),
|
||||
typeof(YiAbpToolApplicationContractsModule))]
|
||||
public class YiAbpToolHttpApiClientModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
//创建动态客户端代理
|
||||
context.Services.AddHttpClientProxies(
|
||||
typeof(YiAbpToolApplicationContractsModule).Assembly
|
||||
|
||||
);
|
||||
Configure<AbpRemoteServiceOptions>(options =>
|
||||
{
|
||||
options.RemoteServices.Default =
|
||||
new RemoteServiceConfiguration("http://localhost:19002");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user