{"id":18720563,"url":"https://github.com/samchenyu/springmysqlstarter","last_synced_at":"2026-05-07T10:32:46.736Z","repository":{"id":251855985,"uuid":"838645775","full_name":"SamChenYu/SpringMySQLStarter","owner":"SamChenYu","description":"Starter code for connecting MySQL database to a Spring Project","archived":false,"fork":false,"pushed_at":"2025-01-22T15:06:13.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-08T05:46:55.484Z","etag":null,"topics":["mysql","rest-api","springboot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/SamChenYu.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,"zenodo":null}},"created_at":"2024-08-06T04:33:15.000Z","updated_at":"2025-01-22T15:06:17.000Z","dependencies_parsed_at":"2025-05-19T14:44:01.353Z","dependency_job_id":"80c837d1-0c18-4838-b2c2-502add4149fd","html_url":"https://github.com/SamChenYu/SpringMySQLStarter","commit_stats":null,"previous_names":["samchenyu/springmysqlstarter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamChenYu/SpringMySQLStarter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamChenYu%2FSpringMySQLStarter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamChenYu%2FSpringMySQLStarter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamChenYu%2FSpringMySQLStarter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamChenYu%2FSpringMySQLStarter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamChenYu","download_url":"https://codeload.github.com/SamChenYu/SpringMySQLStarter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamChenYu%2FSpringMySQLStarter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32733509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["mysql","rest-api","springboot"],"created_at":"2024-11-07T13:31:38.485Z","updated_at":"2026-05-07T10:32:46.717Z","avatar_url":"https://github.com/SamChenYu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpringMySQLStarter\n\n## Features\nREST Controller: Includes a REST controller that provides endpoints for managing Student entities. You can perform CRUD operations (Create, Read, Update, Delete) on the Student records through these endpoints.\n\nJPA Repository: Contains a JPA repository for interacting with the MySQL database. The repository provides methods to save, find, update, and delete Student records without the need to write complex SQL queries.\n\nStudent Entity: Defines a Student object that maps to a STUDENT table in the MySQL database. The entity includes fields for id, mark, and name, and uses annotations to define how these fields map to the table columns.\n\n## Setup\nDatabase Configuration: Update the application.properties file with your MySQL database connection details.\n\nRun the Application: Start the Docker Container for MySQL, then Spring Boot application using your preferred method (e.g., mvn spring-boot:run or running from your IDE).\n\nAccess Endpoints: Use the REST endpoints provided by the controller to interact with the Student records. The base URL for the API is /students.\n\n## Example Endpoints\nGet All Students: GET /students\nGet Student by ID: GET /students/{id}  \nCreate Student: POST /students  \nUpdate Student: PUT /students/{id}  \n\n\n## Dependencies:\n- Spring Web\n- Spring Data JPA\n- MySQL Driver\n- Lombok\n\n# Docker \nStart container: ```docker-compose up -d ```  \nDocker status: ``` docker ps ```  \nAccess MySQL:  ``` docker exec -it mysql_container mysql -u user -p  ```  \nMySQL: ``` SHOW DATABASES; ```  \nExit MySQL ``` exit  ```  \nStop the container: ``` docker-compose down ```  \nRemove the container: ``` docker rm mysql_container ``` \nRemove the db_data: ``` docker rm db_data ``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchenyu%2Fspringmysqlstarter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamchenyu%2Fspringmysqlstarter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchenyu%2Fspringmysqlstarter/lists"}