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
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.
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.
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.
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.
- sudo docker pull hareldocker1/spring-docker-image:latests
- sudo docker images
- sudo docker run -p 8080:8080 IMAGE_NAME