|
|
|
@ -1,4 +1,6 @@ |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using System.IO; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.Http.Client; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
@ -14,10 +16,12 @@ namespace Acme.BookStore.ConsoleApiClient |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
context.Services.Configure<RemoteServiceOptions>(options => |
|
|
|
{ |
|
|
|
options.RemoteServices.Default = new RemoteServiceConfiguration("http://localhost:53929/"); |
|
|
|
}); |
|
|
|
var configuration = new ConfigurationBuilder() |
|
|
|
.SetBasePath(Directory.GetCurrentDirectory()) |
|
|
|
.AddJsonFile("appsettings.json") |
|
|
|
.Build(); |
|
|
|
|
|
|
|
context.Services.Configure<RemoteServiceOptions>(configuration); |
|
|
|
|
|
|
|
context.Services.AddHttpClientProxies( |
|
|
|
typeof(BookStoreApplicationModule).Assembly |
|
|
|
|