Skip to content

umtbrbr/spring-boot-postgresql-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-boot-postgresql-example

The aim of this experiment project are management of campaigns for admin panel and calculate discounts using the campaigns.

API Overview

This project has 5 API as below.

Path Method Body Params Request Params Response Description
/api/v1/campaigns GET Campaign Returns all campaigns without any filter
/api/v1/campaigns POST Campaign Campaign Create a new campaign with given campaign details
/api/v1/campaigns PUT Campaign id Campaign Find campaign with given id and update that campaign
/api/v1/campaigns DELETE id Campaign Delete campaign with given campaign id
/api/v1/campaigns/calculateDiscounts POST List<BasketItem> List<BasketItem> Calculate discounts with using campaign of category or product

Run

1. Build app

Create jar file with below maven command

mvn clean install

2. Run app in docker container

Build and run a docker image with below docker-compose command

docker-compose up -d --build

3. Create tables and insert data

This experiment project is using Postgres for data model. There are two sql files under src/main/resources directory. Schema and tables can create with create_table.sql and initialize data can insert with insert_data.sql

4. Test

This app runs on 8888 port.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •