- Add AuthGrpcService for inter-service token validation - Add FluentValidation validators for auth/menus/roles/users - Fix middleware Stream lifecycle issues - Register ABP ObjectAccessor for container compatibility - Update connection strings for NUC Box infrastructure - Add JWT claim mapping fixes
27 lines
855 B
C#
27 lines
855 B
C#
using FluentValidation;
|
|
using MediatR;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using RAG.Application.Auth.Commands;
|
|
using RAG.Application.Common;
|
|
using RAG.Infrastructure;
|
|
using Volo.Abp.Modularity;
|
|
|
|
namespace RAG.Application;
|
|
|
|
/// <summary>
|
|
/// Application 层模块,注册 MediatR 以启用 CQRS 命令/查询处理。
|
|
/// </summary>
|
|
[DependsOn(typeof(RAGInfrastructureModule))]
|
|
public class RAGApplicationModule : AbpModule
|
|
{
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
var services = context.Services;
|
|
var assembly = typeof(RegisterCommand).Assembly;
|
|
|
|
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(assembly));
|
|
services.AddValidatorsFromAssembly(assembly);
|
|
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>));
|
|
}
|
|
}
|