https://github.com/birddevelper/notebookmanager
A Real World Example for Open API Restful Spring boot Application + Swagger + MySQL + Docker
https://github.com/birddevelper/notebookmanager
docker docker-compose dockerfile h2-database java maven mysql openapi openapi3 rest restful restful-api spring-boot springboot swagger swagger-ui unit-test unittest
Last synced: 10 months ago
JSON representation
A Real World Example for Open API Restful Spring boot Application + Swagger + MySQL + Docker
- Host: GitHub
- URL: https://github.com/birddevelper/notebookmanager
- Owner: birddevelper
- Created: 2022-02-04T09:48:40.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-14T19:20:00.000Z (almost 3 years ago)
- Last Synced: 2025-02-26T19:07:10.562Z (11 months ago)
- Topics: docker, docker-compose, dockerfile, h2-database, java, maven, mysql, openapi, openapi3, rest, restful, restful-api, spring-boot, springboot, swagger, swagger-ui, unit-test, unittest
- Language: Java
- Homepage:
- Size: 121 KB
- Stars: 7
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## NoteBook Manager
### Spring boot Rest Api+swagger+MySQL+Docker tutorial
NoteBook Manager is a sample tiny application that performs CRUD jobs on Notebook Entity via Restful Webservices.
It exposes 5 endpoint as following list :
- GET /api/notebooks (get a list of notebook)
- POST /api/notebooks (create a notebook)
- GET /api/notebooks/1 (get one notebook from the list)
- PATCH /api/notebooks/1 (update the price of a single notebook)
- DELETE /api/notebooks/1 (delete a single notebook)
## How to setup
It is a docker based application. Running below command in project's directory builds 2 running containers, NotebookService and Mysql containers with initial records:
```bash
docker-compose up
```
## How to use
This application is Restful and it follows OpenAPI specification in API documentation. Thanks to SwaggerUI, you can see endpoints documentation in a graphical user interface and try their functionality and see the response. After running the containers, you can access the application links as :
- Application Rest services : http://localhost:8090/api/notebooks
- SwaggerUI : http://localhost:8090/swagger-ui.html
## Test
Tests are written with H2 in-memory database with initial records.
## Link
[This repository belongs to Spring boot Rest Api+swagger+MySQL+Docker tutorial](https://mshaeri.com/blog/restful-spring-boot-application-swagger-mysql-docker-a-real-world-example/)