Library Catalogue

MariaDB database

Installation Instruction

Install binaries

Setup user

  • Add user admin with password admin
GRANT ALL ON *.* TO 'admin'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
  • Flush the privileges
FLUSH PRIVILEGES;

Import initial data

  • Populate database with initial data
mysql -u admin -padmin --default-character-set=utf8 < "PROJECT_DIRECTORY\database\mariadb\schema.sql
mysql -u admin -padmin --default-character-set=utf8 < "PROJECT_DIRECTORY\database\data.sql

H2 database

  • on first run databases will be created and populated with initial data
  • for subsequent runs change (comment out line 3, comment line 4) 'spring.datasource.url' property in application.yaml
  • to access H2 console open http://localhost:8080/h2-console, use credentials: admin/admin

Usage

Prerequisites

Build

mvn clean install

Run

mvn spring-boot:run

Use

Web UI

Open http://localhost:8080

REST API

Use Postman to test API described on SwaggerHub