Skip to content

The project includes: a web that includes api, data base, creating an image with Docker, document for api in swagger.

Notifications You must be signed in to change notification settings

Harelazimtas/App-Spring-Boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App-Spring-Boot

The project includes: a web that includes api, data base, creating an image with Docker, document for API in Swagger.
The Spring Boot avialble at: "http://localhost:8080"
The DB avilable at: "http://localhost:8080/h2/login.do"
The Swagger UI avilable at: "http://localhost:8080/swagger-ui/"
The Docker image avilable at Docker Hub, download image and run application: sudo docker pull hareldocker1/spring-docker-image:latests

Application API


The application Include APIs:
  • List of the inventory items list (item no, name, amount, inventory code).
  • Read item details (by item no).
  • Withdrawal quantity of a specific item from stock.
  • Deposit quantity of a specific item to stock.
  • Add item to stock.

Data Base-H2

Repository: Local storage for software packages usually tables with data.
@Repository is a marker annotation, which indicates that the underlying interface is a repository. 
A repository is created by extending specific repository interfaces, 
such as CrudRepository, PagingAndSortingRepository, or JpaRepository.
CrudRepository implements basic CRUD operations, including count, delete, deleteById, save, saveAll, findById, and findAll.
Using the CrudRepository you can access the table as well as update the data.

Add a product using Postman.


AddItem


Data Base-H2: after add product.


DB-AddItem


Swagger API Document

Swagger is open source that describes the Rest API document.
APIs help the client understand how to use the API.
Restful does not have an API document, so Swagger solves the problem of creating API documents.

Swagger-API


Docker

Docker is software that allows you to run applications on different operating systems, and create docker image.
Allows to deploy efficiently on different platforms.
Docker File: file that contain all requirement and dependency to run application.
Docker Container: used to run a docker image instance.
Docker Hub: Storage space for docker image.

Run Spring Boot on Ubuntu.

  • sudo docker pull hareldocker1/spring-docker-image:latests
  • sudo docker images
  • sudo docker run -p 8080:8080 IMAGE_NAME

About

The project includes: a web that includes api, data base, creating an image with Docker, document for api in swagger.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published