Skip to content

likentong/expcc_query

Repository files navigation

expcc_query

This is a REST application developed using Spring Boot 2 with gradle as build tool. It uses:

  1. MongoDB as datastore
  2. RabbitMQ as message queueing system

Setup
This application support 2 spring profiles:

  1. dev - This is mean for development where it uses embedded mongodb.
  2. sampleData - This is to populate sample data into demographic and person collections in expcc database.
    **DO NOTE that it will drop existing demographic and person collections before inserting the sample data.

Use one of these commands to run the application:

  1. Using dev and sampleData profiles (embedded Mongodb)
    gradlew.bat bootRun -Pargs=--spring.profiles.active=dev,sampleData;--spring.rabbitmq.addresses=amqp://usernama:password@localhost:5672/

  2. Without spring profiles
    gradlew.bat bootRun -Pargs=--spring.rabbitmq.addresses=amqp://usernama:password@localhost:5672/;--expcc.mongodb.uri=mongodb://localhost:27017/admin

Do replace the spring.rabbitmq.addresses and expcc.mongodb.uri with the RabbitMQ and MongoDB connection string that you have setup/installed.

Demographic filtering
This is a sample request to perform query on Demographic collection.

{
   "query":[{
         "$and":{
            "ID":{"$in":[1,2, 3]}
         }
      }]
}

Supported logical operators: $and, $or
Supported comparison operators: $eq, $gt, $gte, $lt, $lte, $in

There is an example of sample request using postman in the doc folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages