This is a project from book Full Stack Development with Spring Boot and React, author Juha Hinkula. I built it step by step as it is shown in the book, and made additional changes when required.
This is the backend of Car Shop, a RESTFUL Web Service with all CRUD functionalities using Spring Boot and MariaDB.
./mvnw spring-boot:run
java -jar .jar
List all docker images
docker image ls
Create image from Dockerfile
docker build -t .
Create and run the container from image
docker run -p 4000:8080
Optional: Creating the database container \
Pull latest mariadb database
docker pull mariadb:latest
Create and run the container from image \ docker run --name -e MARIADB_ROOT_PASSWORD= mariadb
Link and Run car container and database container
docker run -p 8080:8080 --name carapp --link :mariadb -d
View logs of docker container
docker logs carapp
Start a container
docker start
Stop a container
docker stop
Remove a container
docker rm
Remove an image
docker image rm --force
POST
Body
{"username": "user", "password": "user"}
Copy the header with the Bearer token
Add the token value as an Authorization header in any request