Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Galaxy.Api/Galaxy.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
Expand All @@ -9,6 +9,7 @@
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.1.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="2.1.1" />
<PackageReference Include="Volo.Abp.Core" Version="2.1.1" />
<PackageReference Include="Volo.Abp.Http.Client" Version="2.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 9 additions & 1 deletion Galaxy.Api/GalaxyWebModule.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
using Galaxy.Order;
using Galaxy.Product;
using Galaxy.Product.Contracts;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Autofac;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;

namespace Galaxy.Api
{
[DependsOn(typeof(AbpAspNetCoreMvcModule))]
[DependsOn(typeof(AbpAutofacModule))]
[DependsOn(typeof(GalaxyOrderModule), typeof(GalaxyProductModule))]
[DependsOn(typeof(GalaxyOrderModule), typeof(GalaxyProductModule))]
[DependsOn(typeof(AbpHttpClientModule))]
public class GalaxyWebModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
////创建动态客户端代理
//context.Services.AddHttpClientProxies(
// typeof(GalaxyProductContractModule).Assembly, remoteServiceConfigurationName: "ProductStore"
//);

Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(GalaxyOrderModule).Assembly);
Expand Down
7 changes: 5 additions & 2 deletions Galaxy.Order.Api/GalaxyOrderWebModule.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
using Galaxy.Product.Contracts;
using Galaxy.Order.Contracts;
using Galaxy.Product.Contracts;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Autofac;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;

namespace Galaxy.Order.Api
{
[DependsOn(typeof(AbpAspNetCoreMvcModule))]
[DependsOn(typeof(AbpAutofacModule), typeof(GalaxyOrderModule))]
[DependsOn(typeof(AbpHttpClientModule))]
public class GalaxyOrderWebModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
//创建动态客户端代理
////创建动态客户端代理
context.Services.AddHttpClientProxies(
typeof(GalaxyProductContractModule).Assembly, remoteServiceConfigurationName: "ProductStore"
);
Expand Down
14 changes: 7 additions & 7 deletions Galaxy.Order.Api/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"RemoteServices": {
"Default": {
"BaseUrl": "https://localhost:44348/"
},
"RemoteServices": {
"Default": {
"BaseUrl": "https://localhost:44348/"
},
"ProductStore": {
"BaseUrl": "https://localhost:4434/"
}
"ProductStore": {
"BaseUrl": "https://localhost:44349/"
}
}
}