// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/config/AmqpConfig.java
// @EnableRabbit
// @Configuration
// public class AmqpConfig {
// 
//     @Bean
//     public DirectExchange commodityExchange() {
//         return new DirectExchange(REF_DATA_EXCHANGE);
//     }
// 
//     @Bean
//     public Queue commodityDataQueue() {
//         return new Queue(COMMODITY_DATA_QUEUE);
//     }
// 
//     @Bean
//     public Queue counterPartyDataQueue() {
//         return new Queue(COUNTER_PARTY_DATA_QUEUE);
//     }
// 
//     @Bean
//     public Queue locationDataQueue() {
//         return new Queue(LOCATION_DATA_QUEUE);
//     }
// 
// 
//     @Bean
//     public Binding commodityDataQueueBinding(DirectExchange commodityExchange, Queue commodityDataQueue) {
//         return BindingBuilder.bind(commodityDataQueue).to(commodityExchange).with(COMMODITY_DATA_QUEUE);
//     }
// 
//     @Bean
//     public Binding counterPartyDataQueueBinding(DirectExchange commodityExchange, Queue counterPartyDataQueue) {
//         return BindingBuilder.bind(counterPartyDataQueue).to(commodityExchange).with(COUNTER_PARTY_DATA_QUEUE);
//     }
// 
//     @Bean
//     public Binding locationDataQueueBinding(DirectExchange commodityExchange, Queue locationDataQueue) {
//         return BindingBuilder.bind(locationDataQueue).to(commodityExchange).with(LOCATION_DATA_QUEUE);
//     }
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/model/Commodity.java
// @Document
// public class Commodity {
// 
//     @Id @Field("_id") private String code;
//     @Field private String name;
// 
//     public Commodity(String code, String name) {
//         this.code = code;
//         this.name = name;
//     }
// 
//     public String getCode() {
//         return code;
//     }
// 
//     public void setCode(String code) {
//         this.code = code;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/model/CounterParty.java
// @Document
// public class CounterParty {
// 
//     @Id @Field("_id") private String code;
//     @Field private String name;
// 
//     public CounterParty(String code, String name) {
//         this.code = code;
//         this.name = name;
//     }
// 
//     public String getCode() {
//         return code;
//     }
// 
//     public void setCode(String code) {
//         this.code = code;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/model/Location.java
// public class Location {
// 
//     @Id @Field("_id") private String code;
//     @Field private String name;
// 
//     public Location(String code, String name) {
//         this.code = code;
//         this.name = name;
//     }
// 
//     public String getCode() {
//         return code;
//     }
// 
//     public void setCode(String code) {
//         this.code = code;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/repository/CommodityRepository.java
// @Repository
// public interface CommodityRepository extends MongoRepository<Commodity, String> {
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/repository/CounterPartyRepository.java
// @Repository
// public interface CounterPartyRepository extends MongoRepository<CounterParty, String> {
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/repository/LocationRepository.java
// @Repository
// public interface LocationRepository extends MongoRepository<Location, String> {
// 
// }


import jdk.internal.org.objectweb.asm.TypeReference;
import org.sapient.metalica.referencedataservice.config.AmqpConfig;
import org.sapient.metalica.referencedataservice.model.Commodity;
import org.sapient.metalica.referencedataservice.model.CounterParty;
import org.sapient.metalica.referencedataservice.model.Location;
import org.sapient.metalica.referencedataservice.repository.CommodityRepository;
import org.sapient.metalica.referencedataservice.repository.CounterPartyRepository;
import org.sapient.metalica.referencedataservice.repository.LocationRepository;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import javax.annotation.Resource;
import static org.sapient.metalica.referencedataservice.constant.Constants.COMMODITY_DATA_QUEUE;
import static org.sapient.metalica.referencedataservice.constant.Constants.REF_DATA_EXCHANGE;
package org.sapient.metalica.referencedataservice;




@SpringBootApplication
@Import(AmqpConfig.class)
@EnableMongoRepositories
public class BootApplication implements CommandLineRunner {

    @Resource CommodityRepository commodityRepository;
    @Resource CounterPartyRepository counterPartyRepository;
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/config/AmqpConfig.java
// @EnableRabbit
// @Configuration
// public class AmqpConfig {
// 
//     @Bean
//     public DirectExchange commodityExchange() {
//         return new DirectExchange(REF_DATA_EXCHANGE);
//     }
// 
//     @Bean
//     public Queue commodityDataQueue() {
//         return new Queue(COMMODITY_DATA_QUEUE);
//     }
// 
//     @Bean
//     public Queue counterPartyDataQueue() {
//         return new Queue(COUNTER_PARTY_DATA_QUEUE);
//     }
// 
//     @Bean
//     public Queue locationDataQueue() {
//         return new Queue(LOCATION_DATA_QUEUE);
//     }
// 
// 
//     @Bean
//     public Binding commodityDataQueueBinding(DirectExchange commodityExchange, Queue commodityDataQueue) {
//         return BindingBuilder.bind(commodityDataQueue).to(commodityExchange).with(COMMODITY_DATA_QUEUE);
//     }
// 
//     @Bean
//     public Binding counterPartyDataQueueBinding(DirectExchange commodityExchange, Queue counterPartyDataQueue) {
//         return BindingBuilder.bind(counterPartyDataQueue).to(commodityExchange).with(COUNTER_PARTY_DATA_QUEUE);
//     }
// 
//     @Bean
//     public Binding locationDataQueueBinding(DirectExchange commodityExchange, Queue locationDataQueue) {
//         return BindingBuilder.bind(locationDataQueue).to(commodityExchange).with(LOCATION_DATA_QUEUE);
//     }
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/model/Commodity.java
// @Document
// public class Commodity {
// 
//     @Id @Field("_id") private String code;
//     @Field private String name;
// 
//     public Commodity(String code, String name) {
//         this.code = code;
//         this.name = name;
//     }
// 
//     public String getCode() {
//         return code;
//     }
// 
//     public void setCode(String code) {
//         this.code = code;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/model/CounterParty.java
// @Document
// public class CounterParty {
// 
//     @Id @Field("_id") private String code;
//     @Field private String name;
// 
//     public CounterParty(String code, String name) {
//         this.code = code;
//         this.name = name;
//     }
// 
//     public String getCode() {
//         return code;
//     }
// 
//     public void setCode(String code) {
//         this.code = code;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/model/Location.java
// public class Location {
// 
//     @Id @Field("_id") private String code;
//     @Field private String name;
// 
//     public Location(String code, String name) {
//         this.code = code;
//         this.name = name;
//     }
// 
//     public String getCode() {
//         return code;
//     }
// 
//     public void setCode(String code) {
//         this.code = code;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/repository/CommodityRepository.java
// @Repository
// public interface CommodityRepository extends MongoRepository<Commodity, String> {
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/repository/CounterPartyRepository.java
// @Repository
// public interface CounterPartyRepository extends MongoRepository<CounterParty, String> {
// 
// }
// 
// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/repository/LocationRepository.java
// @Repository
// public interface LocationRepository extends MongoRepository<Location, String> {
// 
// }


// Path: multiple-microservices-example/reference-data-service/src/main/java/org/sapient/metalica/referencedataservice/BootApplication.java
import jdk.internal.org.objectweb.asm.TypeReference;
import org.sapient.metalica.referencedataservice.config.AmqpConfig;
import org.sapient.metalica.referencedataservice.model.Commodity;
import org.sapient.metalica.referencedataservice.model.CounterParty;
import org.sapient.metalica.referencedataservice.model.Location;
import org.sapient.metalica.referencedataservice.repository.CommodityRepository;
import org.sapient.metalica.referencedataservice.repository.CounterPartyRepository;
import org.sapient.metalica.referencedataservice.repository.LocationRepository;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import javax.annotation.Resource;
import static org.sapient.metalica.referencedataservice.constant.Constants.COMMODITY_DATA_QUEUE;
import static org.sapient.metalica.referencedataservice.constant.Constants.REF_DATA_EXCHANGE;

package org.sapient.metalica.referencedataservice;




@SpringBootApplication
@Import(AmqpConfig.class)
@EnableMongoRepositories
public class BootApplication implements CommandLineRunner {

    @Resource CommodityRepository commodityRepository;
    @Resource CounterPartyRepository counterPartyRepository;
    @Resource LocationRepository locationRepository;