** How to deploy and access rest apis **
- Clone the repository using git clone
- Move to folder /ebi under checkout
- Open command prompt at current location you are at
- To generate spring boot jar run gradle clean bootJar. This will generate ebi-v1.jar in /ebi/build/libs/ folder
- To create docker image execute command docker build -t persons-interface-image .. This will create image in your local images hub
- To create running containers execute command docker-compose up -d
- This will launch a Spring rest api application and a mongodb instance as datastore
- Application will be running on port 9080
-
After creating containers above you can access the rest apis swagger documentation @ http://[host]:9080/swagger-ui.html#/person45controller
-
Apis are present for below operations and can be accessed using Basic authentication and credentials are userName: user1 and password: user1Pass
- To get all persons available in registry
- To get a person based on id
- To create a new person entry in registry
- To update a person entry based on id
- To delete a person
-
Swagger UI is integrated with the project for accessing full documentation of apis
Junits have been implemented with full coverage
-
Deployment is automated using
- Docker image build
- Docker Compose
- Security is implemented in project using Basic authentication and can be extended to others
- Swagger UI is integrated that gives full insights about apis
- Method level documentation is also maintained
- Since application is dockerized, we can scale app based on our load and requirements
- Internationalization is implemented and validation responses can be served based on user locale
- Exception Handling is generalized
- Environment specific data is maintained in application.properties
- Mongodb is used as back-end datastore