{"id":24750603,"url":"https://github.com/lizhanmit/spring-boot-rest-api-example","last_synced_at":"2026-04-12T21:47:54.253Z","repository":{"id":274413891,"uuid":"922505151","full_name":"lizhanmit/spring-boot-rest-api-example","owner":"lizhanmit","description":"An example of using Spring Boot to build REST API.","archived":false,"fork":false,"pushed_at":"2025-01-27T06:11:52.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T07:20:45.526Z","etag":null,"topics":["java","rest-api","spring-boot"],"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/lizhanmit.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-26T11:57:25.000Z","updated_at":"2025-01-27T06:11:55.000Z","dependencies_parsed_at":"2025-01-27T07:20:47.915Z","dependency_job_id":"29874129-c340-42ce-accb-d0e94d7ab642","html_url":"https://github.com/lizhanmit/spring-boot-rest-api-example","commit_stats":null,"previous_names":["lizhanmit/spring-boot-rest-api-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhanmit%2Fspring-boot-rest-api-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhanmit%2Fspring-boot-rest-api-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhanmit%2Fspring-boot-rest-api-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhanmit%2Fspring-boot-rest-api-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lizhanmit","download_url":"https://codeload.github.com/lizhanmit/spring-boot-rest-api-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245049021,"owners_count":20552611,"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":["java","rest-api","spring-boot"],"created_at":"2025-01-28T09:08:25.678Z","updated_at":"2026-04-12T21:47:49.212Z","avatar_url":"https://github.com/lizhanmit.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-boot-rest-api-example\n\nThis is an example of using Spring Boot to build REST API.\n\nSwagger UI: http://localhost:8080/swagger-ui/index.html\n\nOpenAPI specification: http://localhost:8080/v3/api-docs\n\n## Data Transfer Object (DTO)\n\nA DTO is an object that carries data between processes. DTOs are used to transfer data between the client and the server, or between different layers of the application. They help in decoupling the internal representation of data from the data that is exposed through the API, providing more flexibility and security.\n\nBy using DTOs, you can control the data that is exposed through the API, hide sensitive information, and change the internal representation of data without affecting the API contract.\n\n## Pagination \n\nPagination is used to limit the size of returned result of getting all books.\n\nThe maximum page size is enforced to avoid performance issues and protect server from abuse.\n\n## Test the API\n\nGET: http://localhost:8080/api/books\n\nGET: http://localhost:8080/api/books?page=0\u0026size=10\u0026sort=title,asc\n\nPOST: http://localhost:8080/api/books\n\n```\n{\n \"title\": \"dummy book\",\n \"author\": \"dummy author\",\n \"isbn\": \"111\"\n}\n```\n\nGET: http://localhost:8080/api/books/1\n\nPUT: http://localhost:8080/api/books/1\n\n```\n{\n \"title\": \"dummy book\",\n \"author\": \"dummy author\",\n \"isbn\": \"222\"\n}\n```\n\nDELETE: http://localhost:8080/api/books/1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flizhanmit%2Fspring-boot-rest-api-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flizhanmit%2Fspring-boot-rest-api-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flizhanmit%2Fspring-boot-rest-api-example/lists"}