Skip to content

Sample book store REST API service using Spring Boot (backend).

License

Notifications You must be signed in to change notification settings

KnowHowSpringBoot/sample-bookstore-mvc-rest-api

Repository files navigation

🚀 Book Store REST API

Simple bookstore app for demo purpose using Spring Boot.

Pre-Requisites to run this example locally

git clone https://github.com/KnowHowSpringBoot/bookstore-mvc-rest-api.git

cd bookstore-mvc-rest-api
docker compose -f compose.yaml up -d

Running locally

This application is a Spring Boot application built using Maven. You can build a jar files and run it from the command line:

  • Create jar packages:
./mvnw package
  • Run sample-bookstore-mvc-rest-api app:
java -jar target/*.jar

You might also want to use Maven's spring-boot:run goal - applications run in an exploded form, as they do in your IDE:

./mvnw spring-boot:run -Dspring-boot.run.profiles=local -P dev

Code conventions

The code follows Google Code Conventions. Code quality is measured by:

Tests

This project has standard JUnit tests. To run them execute this command:

./mvnw verify -Puse-qulice

It is mandatory to keep test code coverage not below 80 percents and cover all business logic and edge cases.

Versioning

Project uses a three-segment CalVer scheme, with a short year in the major version slot, short month in the minor version slot, and micro/patch version in the third and final slot.

YY.MM.MICRO
  1. YY - short year - 6, 16, 106
  2. MM - short month - 1, 2 ... 11, 12
  3. MICRO - "patch" segment