{"id":16514362,"url":"https://github.com/ingogriebsch/sample-spring-web-simple-restcontroller","last_synced_at":"2025-03-02T12:17:03.945Z","repository":{"id":36789690,"uuid":"152552113","full_name":"ingogriebsch/sample-spring-web-simple-restcontroller","owner":"ingogriebsch","description":"This sample shows you how to implement a simple REST controller with Spring Web (and Spring Boot)","archived":false,"fork":false,"pushed_at":"2023-06-14T22:44:12.000Z","size":202,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T00:19:55.837Z","etag":null,"topics":["example","java","sample","spring","spring-boot","spring-web"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ingogriebsch.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}},"created_at":"2018-10-11T07:47:43.000Z","updated_at":"2022-10-24T06:52:20.000Z","dependencies_parsed_at":"2023-01-17T04:49:21.680Z","dependency_job_id":null,"html_url":"https://github.com/ingogriebsch/sample-spring-web-simple-restcontroller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingogriebsch%2Fsample-spring-web-simple-restcontroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingogriebsch%2Fsample-spring-web-simple-restcontroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingogriebsch%2Fsample-spring-web-simple-restcontroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingogriebsch%2Fsample-spring-web-simple-restcontroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ingogriebsch","download_url":"https://codeload.github.com/ingogriebsch/sample-spring-web-simple-restcontroller/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241502912,"owners_count":19972956,"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":["example","java","sample","spring","spring-boot","spring-web"],"created_at":"2024-10-11T16:12:21.181Z","updated_at":"2025-03-02T12:17:03.924Z","avatar_url":"https://github.com/ingogriebsch.png","language":"Java","readme":"# Spring Web simple REST controller sample\n[![Actions Status](https://github.com/ingogriebsch/sample-spring-web-simple-restcontroller/workflows/build/badge.svg)](https://github.com/ingogriebsch/sample-spring-web-simple-restcontroller/actions)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=de.ingogriebsch.samples%3Asample-spring-web-simple-restcontroller)\n[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n\nThis sample shows how to implement a simple REST controller with Spring Web (and Spring Boot).\n\n## How to build and run\nIf you want to see the implementation in action, simply follow these steps:\n\n*   First, make sure that you have Java 8 or later installed and an established Internet connection.\n*   Then, clone this Git repository an `cd` into the project folder. \n*   Now invoke `./mvnw spring-boot:run` and wait a moment.\n\nAfter the project is built and the Spring Boot service is running you can hit the following urls to act with the service:\n\n*   [http://localhost:8080](http://localhost:8080) allows to access this site.\n*   [http://localhost:8080/persons](http://localhost:8080/persons) allows to access the person resources available through the service.\n\nHave a look into the implementation to understand which endpoints are available in addition.\n\n## Most important annotations and classes\nA collection of the most important annotations and classes that are necessary to implement this use case. \n\n*   [@GetMapping](https://docs.spring.io/spring-framework/docs/5.3.2/javadoc-api/org/springframework/web/bind/annotation/GetMapping.html)\n*   [@PostMapping](https://docs.spring.io/spring-framework/docs/5.3.2/javadoc-api/org/springframework/web/bind/annotation/PostMapping.html)\n*   [@DeleteMapping](https://docs.spring.io/spring-framework/docs/5.3.2/javadoc-api/org/springframework/web/bind/annotation/DeleteMapping.html)\n*   [@RequestMapping](https://docs.spring.io/spring-framework/docs/5.3.2/javadoc-api/org/springframework/web/bind/annotation/RequestMapping.html)\n*   [@RestController](https://docs.spring.io/spring-framework/docs/5.3.2/javadoc-api/org/springframework/web/bind/annotation/RestController.html)\n*   [@WebMvcTest](https://docs.spring.io/spring-boot/docs/2.4.1/api/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.html)\n\n## Used frameworks\nA collection of the mainly used frameworks in this project. \nThere are more, but they are not that present inside the main use case, therefore they are not listed here.\n\n*   [Spring Web](https://docs.spring.io/spring-framework/docs/5.3.2/spring-framework-reference/web.html#spring-web)\n*   [Spring Boot](https://docs.spring.io/spring-boot/docs/2.4.1/reference/htmlsingle/)\n\n## Additional guides\nThe following guides illustrate how to implement this and related use cases.\n\n* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)\n* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)\n* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)\n\n## License\nThis code is open source software licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0.html).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingogriebsch%2Fsample-spring-web-simple-restcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fingogriebsch%2Fsample-spring-web-simple-restcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingogriebsch%2Fsample-spring-web-simple-restcontroller/lists"}