In this article, you will learn how to use Spring Boot and HarperDB to create a microservice. Later on, you will also look at how to deploy the complete application on AWS Elastic Beanstalk.
- Configure HarperDB instance at studio.harperdb.io/sign-up, create an instance, and receive a unique URL for REST calls.
- Create schemas and tables in HarperDB, e.g., Employee_Leaves schema with Employee and Leaves tables.
- Set up a Spring Boot app, add dependencies (including CData JDBC Driver for HarperDB), and create a connection service.
- Design REST APIs using a controller class with endpoints for handling employee leave data.
- Implement business logic in a service class for fetching, adding, editing, and canceling employee leaves.
- Test API endpoints using Postman to ensure functionality.
- Build a JAR file for the Spring Boot app using Maven.
- Deploy the app to AWS Elastic Beanstalk, configure environment variables, and ensure it runs on port 5000.
- Test the deployed application using the base URL and verify API endpoints work in the cloud.