Skip to content

A REST service written in Java using Spring Boot to perform CRUD operations on MySQL database table.

Notifications You must be signed in to change notification settings

elzacontiero/ContieroCellar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contiero Cellar

This project implements a REST service to keep records of wines in a cellar. It is written in Java using Spring Boot to perform CRUD operations on MySQL database.

Why are we doing this?

This project is part of the requirement for the completion of QA Digital Skills Bootcamp where the fundamentals of Software Development were covered.

The objective is to create a Spring Boot REST API, with utilisation of supporting tools, methodologies, and technologies, that encapsulates all fundamental and practical modules covered during training.

QA Academy Requirements

What went well?

Jira as an Agile project management tool was an extremely valuable instrument for the planning of the whole project as it allowed to layout the work ahead from the big picture to the fine details. Also, Spring Boot Framework was undoubtedly the most helpful in the whole coding experience.

What didn't go as planned?

Some tasks took more effort to implement than originally expected. This happened, for example, during the development of the first action: creating an entity (/wine/create) where much more code was needed than expected. As a result, part of this code was later reused by other actions making subsequent tasks less time consuming.

Possible improvements for future revisions of the project.

It would be nice to have another controller (possibly under /status) containing information about the current status of the Cellar, such as: the total number bottles, total value of the cellar, the most expensive and the cheapest wine, or a list of wines containing low number of bottles that need to be back ordered.

Screenshots of postman requests with the output from the API.

Run in Postman

Test 1 - Create Wine entity

Test 1 - Create Entity

Test 2 - Read all wine entries

Test 2 - Read all wine entries

Test 3 - Edit entry

Test 3 - Edit entry

Test 4 - Delete entry

Test 4 - Delete entry

Test 5 - Get wine entry by type

Test 5 - Get wine entry by type

Test 6 - Get entries cheaper than amount

Test 6 - Get entries cheaper than amount

Test 7 - Get entries by region

Test 7 - Get entries by region

Test 8 - Get entries by type and under price

Test 8 - Get entries by type and under price

Test 9 - Get entries by producer

Test 9 - Get entries by producer

Screenshot of database.

Database

Screenshots of test results.

Spring Application Test

Spring Application Test

Wine Entity Unit Test

Wine Entity Unit Test

Wine Service Unit Test

Wine Service Unit Test

Wine Controller Unit Test

Wine Controller Unit Test

Wine Controller Integration Test

Wine Controller Integration Test

Tests were also run from the command line using ./mvnw test and the output was collected and located in doc/test.log

Link to Jira Board.

https://contieroelza.atlassian.net/jira/software/projects/CC/boards/4/backlog

ERD Diagram

Entity Relationship Diagram for the database.

Wine
ID BIGINT AUTOINCREMENT PRIMARY KEY
NAME VARCHAR(255) NOT NULL
NUMBER_OF_BOTTLES INT
PRICE DOUBLE
PRODUCER VARCHAR(255)
REGION VARCHAR(255)
TYPE VARCHAR(255)
YEAR INT

About

A REST service written in Java using Spring Boot to perform CRUD operations on MySQL database table.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages