Dependencies
-
Spring Boot Starter Data JPA
-
Spring Boot Starter Web MVC
-
MySQL Connector/J
Configure your application.properties with your MySQL database details.
Install Dependencies:
mvn clean install
Run the Application:
mvn spring-boot:run
exported json file for api endpoints is available in postman_api_collection dir
Here are the available API endpoints for the Spring Boot CRUD application:
Test Endpoint
URL: http://localhost:3000/api/test
Method: GET
Description: Checks if the API is running.
Create Cartoon
URL: http://localhost:3000/api/postcartoon
Method: POST
Description: Creates a new cartoon entry in the database.
Get All Cartoons
URL: http://localhost:3000/api/all
Method: GET
Description: Retrieves all cartoon entries from the database.
Update Cartoon
URL: http://localhost:3000/api/update/{id}
Method: PUT
Description: Updates the cartoon entry with the specified ID.
Delete Cartoon
URL: http://localhost:3000/api/delete/{id}
Method: DELETE
Description: Deletes the cartoon entry with the specified ID.