https://github.com/robole/spring-boot-api-for-beginners
Beginner-friendly intro to web services with Spring Boot
https://github.com/robole/spring-boot-api-for-beginners
api resfful restful-services spring spring-boot web-services
Last synced: 3 months ago
JSON representation
Beginner-friendly intro to web services with Spring Boot
- Host: GitHub
- URL: https://github.com/robole/spring-boot-api-for-beginners
- Owner: robole
- Created: 2021-10-07T20:10:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-07T20:50:21.000Z (over 3 years ago)
- Last Synced: 2025-01-13T08:12:17.095Z (5 months ago)
- Topics: api, resfful, restful-services, spring, spring-boot, web-services
- Language: Java
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# From 'A' to 'Web App': Build an API in Java
I wrote [this tutorial](https://www.roboleary.net/java/2020/06/03/spring-boot-api.html) to fill a void that I have noticed. Building web applications is a top priority for people learning backend development, but I haven’t seen any Java or Spring Boot tutorials that is friendly for beginners. Most tutorials are either too trivial ([Hello World API](http://spring.io/guides/gs/rest-service/)) to help you understand what you need to know; or they are overwhelming and assume too much about what you already know!
The [second part of the tutorial](https://www.roboleary.net/testing/2020/06/15/api-testing.html) covers testing this web service. The corresponding code is contained in the "with-tests" branch, the code differs slightly from the "master" branch, and includes the unit tests discussed.
## What you’ll buildYou’ll build a web service that can create, read, update, and delete users.

The default local address for your Spring Boot application will be: [http://localhost:8080](http://localhost:8080),
so the address to get all users would be [http://localhost:8080/users](http://localhost:8080/users) for example.We will create the following actions:
HTTP Method
Address
Action
GET
/users
Get all users
GET
/users/{id}
Get users by id
GET
/users?name=rob+oleary
Get user by name
POST
/users
Add a new user
PUT
/users
Update a user
DELETE
/users/{id}
Delete a user
[The tutorial](https://www.roboleary.net/java/2020/06/03/spring-boot-api.html) outlines prerequisites and provides a step-by-step guide to building the web serivce.
## Show appreciation
If the tutorial was helpful, please star the repo 🌟, and recommend it to others.
You can show your appreciation by [buying me a coffee or sponsoring me](https://ko-fi.com/roboleary). This will offer me encouragement to continue making educational content like this.