[JAVA] Spring Boot: Restful API sample project

I tried to implement Restful API using Spring Boot. Source code: https://github.com/unhurried/spring-boot-rest-api

Library

The libraries used are as follows.

How to launch the API in Eclipse

API request response

API to perform CRUD operation for ToDo resource is implemented.

# Create a ToDo item.
$ curl --request POST \
>  --url http://localhost:8080/example/api/todos \
>  --header 'Content-Type: application/json' \
>  --data '{"title":"Test","content":"This is a test.","date": "2018-06-01"}' \
>  --include

HTTP/1.1 200
Content-Type: application/json
Content-Length: 71

{"id":1,"title":"Test","content":"This is a test.","date":"2018-06-01"}

Recommended Posts

Spring Boot: Restful API sample project
spring boot access authorization RESTful API
RESTful API multi-module sample in IntelliJ + Jersey + Spring Framework
Minimum configuration sample of RESTful API in Jersey + Spring Framework
Implement REST API in Spring Boot
[Java] Sample project for developing web applications with Spring Boot
Launch (old) Spring Boot project in IntelliJ
Create Java Spring Boot project in IntelliJ
Challenge Spring Boot
Spring Boot Form
Spring Boot Memorandum
gae + spring boot
Run a Spring Boot project in VS Code
Build Spring Boot project by environment with Gradle
Java tips-Create a Spring Boot project in Gradle
◆ Get API created by Spring Boot from React
Create a web api server with spring boot
View the Gradle task in the Spring Boot project
SPRING BOOT learning record 01
Spring Boot + Heroku Postgres
Automatically map DTOs to entities with Spring Boot API
Hello World (REST API) with Apache Camel + Spring Boot 2
Spring boot memo writing (1)
[Spring Boot] Get user information with Rest API (beginner)
How to create a Spring Boot project in IntelliJ
First Spring Boot (DI)
SPRING BOOT learning record 02
[Spring Boot] How to create a project (for beginners)
Spring Boot2 cheat sheet
Spring Boot exception handling
Implement a simple Rest API with Spring Security with Spring Boot 2.0
Spring Boot Servlet mapping
Spring boot development-development environment-
Spring Boot learning procedure
Customize REST API error response with Spring Boot (Part 2)
Learning Spring Boot [Beginning]
Spring boot memo writing (2)
Spring Boot 2.2 Document Summary
Try gRPC in Spring Boot & Spring Cloud project (Mac OS)
[Spring Boot] DataSourceProperties $ DataSourceBeanCreationException
Introduce swagger-ui to REST API implemented in Spring Boot
Deploy the Spring Boot project to Tomcat on XAMPP
Spring Boot 2.3 Application Availability
Spring boot tutorials Topics
Customize REST API error response with Spring Boot (Part 1)
Download with Spring Boot
Handle Java 8 date and time API with Thymeleaf with Spring Boot
Implement REST API with Spring Boot and JPA (Application Layer)
Implement REST API with Spring Boot and JPA (Infrastructure layer)
Let's make a simple API with EC2 + RDS + Spring boot ①
Sample web application that handles multiple databases in Spring Boot 1.5
How to call and use API in Java (Spring Boot)
Try hitting the zip code search API with Spring Boot
Implement REST API with Spring Boot and JPA (domain layer)
Implement a simple Rest API with Spring Security & JWT with Spring Boot 2.0
I made a simple MVC sample system using Spring Boot
[Spring Boot] Environment construction (macOS)
Set context-param in Spring Boot
Try Spring Boot from 0 to 100.
Generate barcode with Spring Boot
Hello World with Spring Boot