Files
MesPrintService/Print.Application/ForumApplicationModule.cs

34 lines
851 B
C#
Raw Normal View History

2025-07-12 16:20:14 +08:00
using Microsoft.Extensions.DependencyInjection;
using Print.Forum.Application.Contracts;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace Print.Application;
/// <summary>
/// 项目模块依赖、组件依赖
/// </summary>
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(ForumApplicationContractsModule)
)]
public class ForumApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var services = context.Services;
// 添加ObjectMapper注入
services.AddAutoMapperObjectMapper<ForumApplicationModule>();
// Abp AutoMapper设置
Configure<AbpAutoMapperOptions>(config =>
{
// 添加对应依赖关系Profile
config.AddMaps<ForumApplicationAutoMapperProfile>();
});
}
}