Task 2 : Create a Spring Boot project name course management app and perform CRUD Operations using any testing tool like postman.
Capstone Project -------> Course Management App using Spring Boot
Tech Used : Maven, JDK11, Spring DATA Rest, Lombok, MySQL, embedded TomCat server
This CourseController
class is a part of a Spring Boot application for managing courses. Here's a brief description of each method:
-
home()
- This method is mapped to the URL "/welcome" and returns a simple welcome message for the Course Management Application. -
getCourses()
- This method is mapped to the URL "/courses/all" and retrieves a list of all courses from theCourseService
. -
getCourseFromID(int courseID)
- This method is mapped to the URL "/courses/{courseID}" and retrieves a specific course based on the givencourseID
parameter from theCourseService
. -
addCourse(Course course)
- This method is mapped to the URL "/courses/add" and adds a new course to the system by accepting aCourse
object in the request body. -
updateCourse(Course course)
- This method is mapped to the URL "/courses/update" and updates an existing course by accepting a modifiedCourse
object in the request body. -
deleteCourse(int courseID)
- This method is mapped to the URL "/courses/delete/{courseID}" and deletes a course with the specifiedcourseID
from the system. It returns an HTTP response indicating the status of the operation.
These methods handle various CRUD (Create, Read, Update, Delete) operations for managing courses in the application.
url : http://localhost:8080/welcome
url : http://localhost:8080/courses/all
url : http://localhost:8080/courses/add
url : http://localhost:8080/courses/update
url : http://localhost:8080/courses/deletecourse/{ID}?ID="11"