2025-04-15 17:57:47 +08:00
|
|
|
|
using Cassandra;
|
|
|
|
|
|
using Cassandra.Mapping;
|
|
|
|
|
|
using JiShe.CollectBus.Cassandra.Mappers;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
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
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
|
|
{
|
2025-04-15 17:57:47 +08:00
|
|
|
|
Configure<CassandraConfig>(context.Services.GetConfiguration().GetSection("Cassandra"));
|
|
|
|
|
|
|
|
|
|
|
|
context.AddCassandra();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void OnApplicationInitialization(ApplicationInitializationContext context)
|
|
|
|
|
|
{
|
|
|
|
|
|
context.UseCassandra();
|
2025-04-14 15:31:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|