{"id":21684071,"url":"https://github.com/rodrigobalazs/springboot-rest-sql","last_synced_at":"2026-04-11T13:33:13.895Z","repository":{"id":258717293,"uuid":"872064151","full_name":"rodrigobalazs/springboot-rest-sql","owner":"rodrigobalazs","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-25T20:52:58.000Z","size":162,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T21:08:51.370Z","etag":null,"topics":["api-rest","docker","java","junit","maven","springboot","springdata"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodrigobalazs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-10-13T17:29:13.000Z","updated_at":"2025-07-25T20:53:01.000Z","dependencies_parsed_at":"2024-10-26T17:19:43.017Z","dependency_job_id":null,"html_url":"https://github.com/rodrigobalazs/springboot-rest-sql","commit_stats":null,"previous_names":["rodrigobalazs/springboot-rest-sql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rodrigobalazs/springboot-rest-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobalazs%2Fspringboot-rest-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobalazs%2Fspringboot-rest-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobalazs%2Fspringboot-rest-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobalazs%2Fspringboot-rest-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodrigobalazs","download_url":"https://codeload.github.com/rodrigobalazs/springboot-rest-sql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobalazs%2Fspringboot-rest-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31682953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["api-rest","docker","java","junit","maven","springboot","springdata"],"created_at":"2024-11-25T16:14:30.143Z","updated_at":"2026-04-11T13:33:13.868Z","avatar_url":"https://github.com/rodrigobalazs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Spring Boot REST API\nThis repository contains an Spring Boot Store Application. The app provides a REST API related to Categories and\nProducts associated to the Categories.\u003cbr/\u003e\nAlthough the domain model is very simple, the goal is to provide examples of Spring related technologies, like\nSpring Boot, Spring Data, etc.\n\n### 🔧 Technology Stack\n\n```\nJava 17\nSpring Boot 3 ( REST API )\nSpring Data ( MySQL )\nTesting (  Junit 5  /  Mockito  /  TestContainers  )\nMisc Libraries (  Maven  /  Docker  /  SpringDoc OpenAPI  /  Apache Commons  /  Lombok  )\n```\n\n### ⚒️ Getting Started\n\n```bash\n# clone the project\ngit clone https://github.com/rodrigobalazs/springboot-rest-sql.git;\ncd springboot-rest-sql;\n\n# start a mysql docker container\ndocker run --name store_db -e MYSQL_DATABASE=store_db -e MYSQL_USER=\u003cuser\u003e \\\n    -e MYSQL_PASSWORD=\u003cpass\u003e -e MYSQL_ROOT_PASSWORD=\u003cpass\u003e \\\n    -p 3306:3306 -d mysql:latest;\n\n# make sure to update application.properties with the\n# MYSQL_USER and MYSQL_PASSWORD values defined in the previous point\nspring.datasource.username=\u003cuser\u003e\nspring.datasource.password=\u003cpass\u003e\n\n# compile and start the spring boot server\nmvn clean install;\nmvn spring-boot:run;\n```\n\n### 💡 API Examples\n\n#### 1. Get all the available Categories =\u003e\n```\ncurl -X GET http://localhost:8080/category/getCategories    -H 'accept: application/json';\n```\n\n#### 2. Retrieves a Category by Category Name =\u003e\n```\ncurl -X GET http://localhost:8080/category/name/Furniture   -H 'accept: application/json';\n```\n\n\n#### 3. Deletes a Category by Category id =\u003e\n```\ncurl -X DELETE http://localhost:8080/category/id/1          -H 'accept: application/json';\n```\n\n#### 4. Creates a new 'Sports Equipment' Category with an associated Product =\u003e\n```\ncurl -X POST http://localhost:8080/category  \\\n     -H 'accept: application/json'  \\\n     -H 'Content-Type: application/json' -d \\\n'{\n    \"name\": \"Sports Equipment\",\n    \"products\": [\n        {\n            \"name\": \"Triathlon Suit\",\n            \"price\": 250.1\n        }\n    ]\n}';\n```\n\n#### 5. Updates the product 'Sweater Tangle Essential' price from $50.4 to $90.8 =\u003e\n```\ncurl -X PUT http://localhost:8080/category/id/2  \\\n     -H 'accept: application/json' \\\n     -H 'Content-Type: application/json' -d \\\n'{\n    \"name\": \"Clothing\",\n    \"products\": [\n        {\n            \"id\": 4,\n            \"name\": \"Sweater Tangle Essential\",\n            \"price\": 90.8\n        }\n    ]\n}';\n```\n\n### 🔍 API Documentation / Swagger\n\nthe API documentation could be accessed from =\u003e http://localhost:8080/swagger-ui/index.html\n\n![](https://github.com/rodrigobalazs/springboot-rest-sql/blob/main/src/main/resources/static/api_swagger.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigobalazs%2Fspringboot-rest-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodrigobalazs%2Fspringboot-rest-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigobalazs%2Fspringboot-rest-sql/lists"}