//package org.egl_cepgl.pm.config;
//
//import com.mongodb.MongoClientSettings;
//import com.mongodb.reactivestreams.client.MongoClient;
//import com.mongodb.reactivestreams.client.MongoClients;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.mongodb.ReactiveMongoDatabaseFactory;
//import org.springframework.data.mongodb.core.ReactiveMongoTemplate;
//import org.springframework.data.mongodb.core.SimpleReactiveMongoDatabaseFactory;
//
//@Configuration
//public class MongoConfig
//{
//    @Value("${mongo-db-name}")
//    private String MONGO_DB_NAME;
//
//    @Value("${mongodb-url}")
//    private String MONGODB_URL;
//
//    @Bean
//    public ReactiveMongoTemplate reactiveMongoTemplate(ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory) {
//        return new ReactiveMongoTemplate(reactiveMongoDatabaseFactory);
//    }
//
//    // You might also need to define ReactiveMongoDatabaseFactory if not auto-configured
//     @Bean
//     public ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory(MongoClient mongoClient) {
//         return new SimpleReactiveMongoDatabaseFactory(mongoClient, MONGO_DB_NAME);
//     }
//
//    @Bean
//    public MongoClient mongoClient() {
//        return MongoClients.create(MONGODB_URL); // Adjust connection string as needed
//    }
//}
