FoodLabelingThApplicationModule.cs 1.18 KB
using FoodLabeling.Application;
using FoodLabeling.Th.Application.Contracts;
using FoodLabeling.Th.Application.Contracts.Options;
using FoodLabeling.Th.Domain;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Yi.Framework.Ddd.Application;

namespace FoodLabeling.Th.Application;

/// <summary>
/// Food Labeling 模块 - 应用层(泰额版)
/// </summary>
[DependsOn(
    typeof(FoodLabelingThApplicationContractsModule),
    typeof(FoodLabelingThDomainModule),
    typeof(FoodLabelingApplicationModule),
    typeof(YiFrameworkDddApplicationModule)
)]
public class FoodLabelingThApplicationModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<FoodLabelingThTenantDatabaseOptions>(
            context.Services.GetConfiguration().GetSection(FoodLabelingThTenantDatabaseOptions.SectionName));

        Configure<AbpAspNetCoreMvcOptions>(options =>
        {
            options.ConventionalControllers.Create(typeof(FoodLabelingThApplicationModule).Assembly,
                opt => opt.RemoteServiceName = "泰额版-食品标签");
        });
    }
}