This is a REST application developed using Spring Boot 2 with gradle as build tool. It uses:
- MongoDB as datastore
- RabbitMQ as message queueing system
Setup
This application support 2 spring profiles:
- dev - This is mean for development where it uses embedded mongodb.
- 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:
-
Using dev and sampleData profiles (embedded Mongodb)
gradlew.bat bootRun -Pargs=--spring.profiles.active=dev,sampleData;--spring.rabbitmq.addresses=amqp://usernama:password@localhost:5672/
-
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.