Springboot CRUD Rest Api with MongoDB
This is a sample appliction for springboot employee management api with following Integrations:
- Springboot Cloud configurations. # mvn spring-boot:run -Dprofile=dev -q
- Swagger-UI Integration.
- Docker Maven Integration ( with Dockerfile and docker-compose.yml)
Following Methods available:
- GET /api/getEmployees - Get all employee details
- GET /api/getEmployee/{employee_id} - Get specific employee detail.
- POST /api/createEmployee with data - Add New Employee to MongoDB
- PUT /api/updateEmployee/{employee_id} with data- Update existing employee
- DELETE /api/deleteEmployee/{employee_id} - Remove employee details from MongoDB.
Prequisites
- Have Maven downloded and is in Path.
- Java 7+
- MongoDB Installled.
How to run this sample
- Download and extract this project.
- Start MongoDB with
mongod --dbpath data_directory_path - Change your MongoDb configuration in src/java/resource/application.properties
- Since this project is integration with Config Server, It is fetching configurations from git uri : https://github.com/ashif14/springboot-configurations.git
- Go to CMD and run
- By default if you don't pass any profile, it will take 'dev' profile
mvn spring-boot:run- Start with specific profile.
mvn spring-boot:run -Dprofile=docker - Go to browser type http://localhost:8080/swagger-ui.html

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
