Skip to content

Simple RESTful CRUD application (based on Spring Boot)

Notifications You must be signed in to change notification settings

wkrzywiec/NoticeBoard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noticeboard CRUD application

Master Branch Coverage Quality Gate Status

This is a simple RESTful CRUD (Create Read Update Delete) application for managing Boards, Notices and Authors saved in PostgreSQL database. It provides basic REST endpoints like fetching all objects of given type, finding them by their id, creating them and so on.

data-model

Usage

An application expose 5 REST endpoints for each entity. For example Notice (and any other) they are:

  • GET {baseURL}/notices/ - lists all Notices (as Json array),
  • GET {baseURL}/notices/{id} - gets single Notice (as Json) by its {id},
  • POST {baseURL}/notices/ - creates a new Notice which is passed in the BODY of the request,
  • PUT {baseURL}/notices/{id} - updates an existing Notice (with an {id}) with Notice passed in the body of the request,
  • DELETE {baseURL}/notices/{id}- deletes an existing Notice by its {id}.

If you run this application locally the {baseUrl} would be http://localhost:8080.

All available endpoints are listed on Swagger UI page which can be entered, when application is running, under http://localhost:8080/swagger-ui.html URL.

endpoints

Installation

Run

Before running the application make sure that you are running PostgreSQL database on your local machine.

In order to run it use following command:

mvn clean spring-boot:run

Integration tests

In this project there are located several integration tests for REST endpoints during which H2 database is used. To run those tests activate Mavan -P integration-test profile:

mvn clean verify -P integration-test

License

The MIT License - 2020 - Wojciech Krzywiec