{"id":15704103,"url":"https://github.com/mechero/spring-boot-restcontroller","last_synced_at":"2025-05-07T22:46:15.919Z","repository":{"id":46571116,"uuid":"83344665","full_name":"mechero/spring-boot-restcontroller","owner":"mechero","description":"Sample code for a RestController in Spring using Swagger","archived":false,"fork":false,"pushed_at":"2024-08-26T16:10:25.000Z","size":94,"stargazers_count":6,"open_issues_count":3,"forks_count":20,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T22:46:10.294Z","etag":null,"topics":["rest-api","restcontroller","spring-boot"],"latest_commit_sha":null,"homepage":"https://thepracticaldeveloper.com/2017/03/04/restcontroller-spring-boot-example-with-springfox-swagger/","language":"Shell","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/mechero.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":"2017-02-27T18:49:34.000Z","updated_at":"2023-08-23T14:30:10.000Z","dependencies_parsed_at":"2024-10-24T06:16:02.161Z","dependency_job_id":"98130b70-b460-472f-aef6-154dec1c8d0a","html_url":"https://github.com/mechero/spring-boot-restcontroller","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"dac36a40cebd3cdf01825972a677727c2fadca24"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechero%2Fspring-boot-restcontroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechero%2Fspring-boot-restcontroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechero%2Fspring-boot-restcontroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechero%2Fspring-boot-restcontroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mechero","download_url":"https://codeload.github.com/mechero/spring-boot-restcontroller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252967982,"owners_count":21833247,"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":["rest-api","restcontroller","spring-boot"],"created_at":"2024-10-03T20:10:21.361Z","updated_at":"2025-05-07T22:46:15.901Z","avatar_url":"https://github.com/mechero.png","language":"Shell","readme":"# Spring Boot @RestController Example\n\n## Description\n\nThis project contains the sample code used in [The Practical Developer Blog](https://thepracticaldeveloper.com/2017/03/04/restcontroller-spring-boot-example-with-springfox-swagger/). It's a Spring Boot application with one plain Java object (`SpanishGreeting`) and a Spring Controller `SpanishGreetingController`.\n\nThe main goal of the project is to show how to write a `@RestController` in Spring Boot and include documentation with Swagger.\n \n## How does it work?\n\nYou can use the endpoints behind `http://localhost:8080/spanish-greetings`. If you append `/random` to a `GET` request you'll receive a random Spanish greeting (which are actually hard-coded). You can also `GET` them by `id` (only from 1 to 3). To create a new one, you need to perform a `POST` operation.\n\nActually, much better if you just start the application and navigate to `http://localhost:8080/swagger-ui.html`. There you'll find a nice API documentation thanks to Swagger. Moreover, *you can play with it*.\n\n![Swagger Documentation](images/swagger.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmechero%2Fspring-boot-restcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmechero%2Fspring-boot-restcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmechero%2Fspring-boot-restcontroller/lists"}