Training Center Application contains information related to Goverment funded Training Centers(hypothethically)
NOTE: You don't need to create DB tables ,it will create itself once you build the Project.
It contains the following apis:
- GET "v1/centers" : It is used to get list of all training centers.
=========================================================
curl --location --request GET 'http://localhost:8080/v1/centers'
--header 'Content-Type: application/json'
--data-raw '{"centerCode": "kjvh56788021", "centerName":"test center 1", "studentCapacity":60, "address":{ "state":"UP", "city":"new york", "detailedAddress":"XYZ road", "pinCode":247776 }, "courses":[ { "courseName":"Java"
}, { "courseName":"SpringBoot" } ], "contactEmail":"help@gmail.com", "contactPhone":"8445958023" }'
=========================================================
- POST "v1/center" : It is used to add a new training center.
=========================================================
curl --location --request POST 'http://localhost:8080/v1/center'
--header 'Content-Type: application/json'
--data-raw '{"centerCode": "kjvh56788021", "centerName":"test center 1", "studentCapacity":60, "address":{ "state":"UP", "city":"new york", "detailedAddress":"XYZ road", "pinCode":247776 }, "courses":[ { "courseName":"Java"
}, { "courseName":"SpringBoot" } ], "contactEmail":"help@gmail.com", "contactPhone":"8445958023" }'
=========================================================
It contains the following files:
-
TrainingCenterController.java: It is a REST controller that provides endpoints for get and post request.
-
TrainingCenterService.java: It is a service class that contains all the business logic.
-
TrainingCenterRepository.java: It connects with the database and provides method for performing basic CRUD operations.
-
TrainingCenter.java: It is a entity class that contains complete training center information.
-
Address: It is a entity class that contains information about address of training centers.
-
Course: It is a entity class that contains information related to the courses offered by each training center.
-
TrainingCenterDTO: It is DTO class .
Tools and Technologies Used:
- Spring Boot
- Hibernate
- MySQL 4.The Project Lombok
- Model Mapper
- Hibernate Validator