26 lines
741 B
C#
Raw Permalink Normal View History

2025-04-21 09:54:34 +08:00
using Microsoft.Extensions.DependencyInjection;
2025-04-15 17:57:47 +08:00
using Volo.Abp;
using Volo.Abp.Autofac;
2025-04-14 15:31:10 +08:00
using Volo.Abp.Modularity;
namespace JiShe.CollectBus.Cassandra
{
2025-04-15 17:57:47 +08:00
[DependsOn(
typeof(AbpAutofacModule)
)]
2025-04-14 15:31:10 +08:00
public class CollectBusCassandraModule : AbpModule
{
2025-04-16 16:12:38 +08:00
public override Task ConfigureServicesAsync(ServiceConfigurationContext context)
2025-04-14 15:31:10 +08:00
{
2025-04-15 17:57:47 +08:00
Configure<CassandraConfig>(context.Services.GetConfiguration().GetSection("Cassandra"));
context.AddCassandra();
2025-04-16 16:12:38 +08:00
return Task.CompletedTask;
2025-04-15 17:57:47 +08:00
}
2025-04-16 16:12:38 +08:00
public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
2025-04-15 17:57:47 +08:00
{
2025-04-16 16:12:38 +08:00
await context.UseCassandra();
2025-04-14 15:31:10 +08:00
}
}
}