3 changed files with 87 additions and 52 deletions
@ -1,67 +1,47 @@ |
|||||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
<Project Sdk="Microsoft.NET.Sdk.Web"> |
||||
|
|
||||
|
<Import Project="..\..\..\..\common.props" /> |
||||
|
|
||||
<PropertyGroup> |
<PropertyGroup> |
||||
<TargetFramework>net6.0</TargetFramework> |
<TargetFramework>net6.0</TargetFramework> |
||||
<Nullable>enable</Nullable> |
<Nullable>enable</Nullable> |
||||
<ImplicitUsings>enable</ImplicitUsings> |
<ImplicitUsings>enable</ImplicitUsings> |
||||
</PropertyGroup> |
</PropertyGroup> |
||||
|
|
||||
<!-- DOMAIN SHARED --> |
|
||||
<ItemGroup> |
<ItemGroup> |
||||
<PackageReference Include="Volo.Abp.Validation" Version="5.1.2" /> |
<PackageReference Include="Google.Protobuf" Version="3.19.3" /> |
||||
|
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.42.0" /> |
||||
|
<PackageReference Include="Grpc.Tools" Version="2.42.0" PrivateAssets="All" /> |
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0" /> |
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0" /> |
||||
<ProjectReference Include="..\..\..\ordering\src\EShopOnAbp.OrderingService.Domain.Shared\EShopOnAbp.OrderingService.Domain.Shared.csproj" /> |
|
||||
</ItemGroup> |
<PackageReference Include="Volo.Abp.Authorization" Version="5.1.2"/> |
||||
<ItemGroup> |
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="5.1.2" /> |
||||
<EmbeddedResource Include="Localization\BasketService\*.json" /> |
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.2" /> |
||||
<Content Remove="Localization\BasketService\*.json" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- DOMAIN --> |
|
||||
<ItemGroup> |
|
||||
<ProjectReference Include="..\EShopOnAbp.BasketService.Domain.Shared\EShopOnAbp.BasketService.Domain.Shared.csproj" /> |
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="5.1.2" /> |
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="5.1.2" /> |
<PackageReference Include="Volo.Abp.Caching" Version="5.1.2" /> |
||||
</ItemGroup> |
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="5.1.2" /> |
||||
|
<PackageReference Include="Volo.Abp.Ddd.Application" Version="5.1.2" /> |
||||
<!-- APPLICATION CONTRACTS --> |
<PackageReference Include="Volo.Abp.Validation" Version="5.1.2" /> |
||||
<ItemGroup> |
|
||||
<ProjectReference Include="..\EShopOnAbp.BasketService.Domain.Shared\EShopOnAbp.BasketService.Domain.Shared.csproj" /> |
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="5.1.2" /> |
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="5.1.2" /> |
|
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
<!-- APPLICATION --> |
<ItemGroup> |
||||
<ItemGroup> |
|
||||
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.2" /> |
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="5.1.2" /> |
|
||||
<PackageReference Include="Google.Protobuf" Version="3.19.3" /> |
|
||||
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.42.0" /> |
|
||||
<PackageReference Include="Grpc.Tools" Version="2.42.0" PrivateAssets="All" /> |
|
||||
<Protobuf Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.Application.Contracts\Protos\product.proto" GrpcServices="Client" /> |
|
||||
<ProjectReference Include="..\EShopOnAbp.BasketService.Domain\EShopOnAbp.BasketService.Domain.csproj" /> |
|
||||
<ProjectReference Include="..\EShopOnAbp.BasketService.Application.Contracts\EShopOnAbp.BasketService.Application.Contracts.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.HttpApi.Client\EShopOnAbp.CatalogService.HttpApi.Client.csproj" /> |
<ProjectReference Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.HttpApi.Client\EShopOnAbp.CatalogService.HttpApi.Client.csproj" /> |
||||
|
<ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Hosting.Microservices\EShopOnAbp.Shared.Hosting.Microservices.csproj" /> |
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
<!-- HTTP API --> |
|
||||
<ItemGroup> |
<ItemGroup> |
||||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="5.1.2" /> |
<Protobuf Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.Application.Contracts\Protos\product.proto" GrpcServices="Client" /> |
||||
<ProjectReference Include="..\EShopOnAbp.BasketService.Application.Contracts\EShopOnAbp.BasketService.Application.Contracts.csproj" /> |
|
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
<!-- HTTP API HOST --> |
|
||||
<ItemGroup> |
<ItemGroup> |
||||
<ProjectReference Include="..\EShopOnAbp.BasketService.Application\EShopOnAbp.BasketService.Application.csproj" /> |
<EmbeddedResource Include="Localization\BasketService\*.json" /> |
||||
<ProjectReference Include="..\EShopOnAbp.BasketService.HttpApi\EShopOnAbp.BasketService.HttpApi.csproj" /> |
<Content Remove="Localization\BasketService\*.json" /> |
||||
<ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Hosting.Microservices\EShopOnAbp.Shared.Hosting.Microservices.csproj" /> |
|
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
<ItemGroup> |
<ItemGroup> |
||||
<Compile Remove="Logs\**" /> |
<Compile Remove="Logs\**" /> |
||||
<Content Remove="Logs\**" /> |
<Content Remove="Logs\**" /> |
||||
<EmbeddedResource Remove="Logs\**" /> |
<EmbeddedResource Remove="Logs\**" /> |
||||
<None Remove="Logs\**" /> |
<None Remove="Logs\**" /> |
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
</Project> |
</Project> |
||||
|
|||||
@ -1,6 +1,34 @@ |
|||||
var builder = WebApplication.CreateBuilder(args); |
using EShopOnAbp.Shared.Hosting.AspNetCore; |
||||
var app = builder.Build(); |
using Serilog; |
||||
|
|
||||
app.MapGet("/", () => "Hello World!"); |
namespace EShopOnAbp.BasketService; |
||||
|
|
||||
app.Run(); |
public class Program |
||||
|
{ |
||||
|
public static async Task<int> Main(string[] args) |
||||
|
{ |
||||
|
var assemblyName = typeof(Program).Assembly.GetName().Name; |
||||
|
|
||||
|
SerilogConfigurationHelper.Configure(assemblyName); |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
Log.Information($"Starting {assemblyName}."); |
||||
|
var app = await ApplicationBuilderHelper |
||||
|
.BuildApplicationAsync<BasketServiceModule>(args); |
||||
|
await app.InitializeApplicationAsync(); |
||||
|
await app.RunAsync(); |
||||
|
|
||||
|
return 0; |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
Log.Fatal(ex, $"{assemblyName} terminated unexpectedly!"); |
||||
|
return 1; |
||||
|
} |
||||
|
finally |
||||
|
{ |
||||
|
Log.CloseAndFlush(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue