{"id":24440063,"url":"https://github.com/prathampalsingh/springboot_curd_operations","last_synced_at":"2026-05-20T02:53:02.879Z","repository":{"id":273064748,"uuid":"914986163","full_name":"prathampalsingh/Springboot_Curd_Operations","owner":"prathampalsingh","description":"This project demonstrates fundamental concepts of Java, Spring, and MySQL by creating a simple application that interacts with a relational database.","archived":false,"fork":false,"pushed_at":"2025-01-18T11:40:30.000Z","size":53,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T01:12:36.057Z","etag":null,"topics":["jakarta","java-8","lombok","mysql-driver","spring-boot","spring-data-jpa","spring-web"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prathampalsingh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-10T18:09:12.000Z","updated_at":"2025-01-19T18:48:50.000Z","dependencies_parsed_at":"2025-01-18T12:38:53.887Z","dependency_job_id":null,"html_url":"https://github.com/prathampalsingh/Springboot_Curd_Operations","commit_stats":null,"previous_names":["prathampalsingh/springboot_curd_operations"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prathampalsingh%2FSpringboot_Curd_Operations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prathampalsingh%2FSpringboot_Curd_Operations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prathampalsingh%2FSpringboot_Curd_Operations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prathampalsingh%2FSpringboot_Curd_Operations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prathampalsingh","download_url":"https://codeload.github.com/prathampalsingh/Springboot_Curd_Operations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505959,"owners_count":20301618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jakarta","java-8","lombok","mysql-driver","spring-boot","spring-data-jpa","spring-web"],"created_at":"2025-01-20T20:27:59.816Z","updated_at":"2026-05-20T02:53:02.853Z","avatar_url":"https://github.com/prathampalsingh.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot CRUD Operations with MySQL\n\nThis project demonstrates fundamental concepts of Java, Spring Boot, and MySQL by creating a simple application that interacts with a relational database.\n\n**Key Features:**\n\n* **Spring Boot:** Leverages the Spring Boot framework for rapid application development, including dependency injection, auto-configuration, and embedded servers.\n* **MySQL:** Utilizes MySQL as the underlying database for data storage and retrieval.\n* **JPA and Hibernate:** Employs Java Persistence API (JPA) and Hibernate as the Object-Relational Mapping (ORM) layer to interact with the database using Java objects.\n* **CRUD Operations:** Implements core CRUD (Create, Read, Update, Delete) operations on a chosen entity (e.g., a User, Product) through a RESTful API.\n* **RESTful API:** Exposes endpoints (e.g., GET, POST, PUT, DELETE) for interacting with the data using HTTP requests.\n\n**Technical Steps:**\n\n1. **Project Setup:**\n\n   * Create a Spring Boot project using Spring Initializr.\n   * Use Java version 17 or higher and Maven.\n   * Add dependencies for:\n       * Spring Web\n       * Spring Data JPA\n       * MySQL Driver\n       * Lombok\n\n2. **Project Setup (After Cloning):**\n\n   * Run `mvn clean install` in the terminal to download all dependencies.\n\n3. **Database Setup:**\n\n   * Create a database named `newdb` using the following SQL command:\n\n     ```sql\n     create database newdb abcd;\n     ```\n\n   * Important: Update the `username` and `password` in the `application.properties` file with your MySQL credentials.\n\n4. **Run the Application:**\n\n   * Start the Spring Boot application using your preferred IDE or by running `mvn spring-boot:run` in the terminal.\n\n5. **Explore and Experiment:**\n\n   * Use a tool like Postman to interact with the exposed RESTful endpoints.\n   * Test the CRUD operations using Postman.\n   * Modify the entity, service, and controller classes to explore different functionalities.\n\n**Getting Started with Postman:**\n\n1. Install Postman: https://www.getpostman.com/\n2. Create a new collection for your project.\n3. **Create Operation:**\n   * Set the request method to `POST`.\n   * Set the URL to `http://localhost:8080/addStd` (assuming the application runs on port 8080).\n   * In the Body tab, select `raw` and set the content type to `application/json`.\n   * Provide a JSON object representing the student data you want to create \n     ```json\n     {\"name\": \"John Doe\",\"mark\": 30}\n     ```\n   * Send the request.\n5. **Read Operation:**\n   * Set the request method to `GET`.\n   * Set the URL to `http://localhost:8080/getAllData` to retrieve all students.\n   * You can also use `http://localhost:8080/getStdById/{id}` to retrieve a specific student by ID, replacing `{id}` with the actual student ID.\n   * Send the request.\n6. **Update Operation:**\n   * Set the request method to `PUT`.\n   * Set the URL to `http://localhost:8080/updStd`.\n   * In the Body tab, provide a JSON object representing the updated student data.\n   * Send the request.\n7. **Delete Operation:** (**Not implemented in this example project**):\n   * You can implement a DELETE endpoint to remove students from the database. Refer to Spring Data JPA documentation for guidance.\n\nThis project provides a solid foundation for understanding core Spring Boot concepts and building more complex applications with database interactions.\n **Result**\n\nStudent database:\n\n![student_newdb](https://github.com/user-attachments/assets/a125d86e-cfce-413c-b541-7c58575f4667)\n\nSpring Starting:\n\n![student_vs](https://github.com/user-attachments/assets/82535cf7-5af1-40d4-be24-ad84f082abb0)\n\nPost student data in database using postman:\n\n![post_req_student](https://github.com/user-attachments/assets/ec4df98b-2966-4132-bb75-142639e714ab)\n\nGet Student data by ID in postman:\n\n![get_studentbyid](https://github.com/user-attachments/assets/e10a76cf-4d45-4312-bf8d-3837de157a72)\n\n\n \n**Note:**\n\n* This README file provides a basic overview. For detailed instructions and implementation specifics, refer to the project's source code and comments.\n* This project is intended for educational and learning purposes.\n\n**I hope this enhanced README file is more informative and appealing!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprathampalsingh%2Fspringboot_curd_operations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprathampalsingh%2Fspringboot_curd_operations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprathampalsingh%2Fspringboot_curd_operations/lists"}