Skip to content

wmichalska/CreditManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CreditManager

Credit Manager is an app, which gives ability to manage Credits.

Specification

  • Java: 11
  • Database: H2
  • Build automation tool: Apache Maven
  • Spring Boot starter version: 2.4.5
  • UI framework: Thymeleaf

Data Model

Persistence

Storage Layer

There are three Repositories to handle the main entities: Credit, Customer and Product. These Repositories are based on Spring JPA framework and what is basic for Spring JPA, these Repositories contains minimal code. Some of initial data is hard coded inside Application Class.

Structure

structure

Spring application architecture

Credit Manager is created with typical architecture of a Spring application. img.png

default server.port=8090
default homepage adress: http://localhost:8090/home

Controller

Controller consists of GET and POST requests to handle REST APIs, both from web browser and tool for rest api testing (Postman).

UI interface

Interface is created from template framework - Thymeleaf. Main interfaces are: Home Page, Create Credit Page and Get Credits Page. On pages are implemented "Back" buttons to help with navigation.

Home page:

@GetMapping(value = "/home")

home

@GetMapping(value = "/createCredit")

Thymeleaf form collects data needed to create Credit.

create

Additional feature

Web form has validation to inserted values, every cell has to have lenght bigger than 0 and @NoNull, pesel number has to have 11 characters.

@GetMapping(value = {"/getList"})

Thymeleaf view shows table witch created Credits get

Postman

It's possible to manage data or test from Postman or other similar tool, example requests:

@PostMapping("/create/credit")
@GetMapping("/get/credits")
@PostMapping("/create/customer")
@GetMapping("/get/customers")
@PostMapping("/create/product")
@GetMapping("/get/products")