Repository is for educational purpose - implementing practical tasks on the discipline "Design technologies and patterns" in the university "Kharkiv National University of Radio Electronics".
The purpose of the project is implementing simple web-application (warehouse) using different design patterns.
- Builder (with future inheritance)
- DAO (Abstract factory)
- PRG (Post-Redirect-Get)
- IoC (Inversion of Control) container, DI (Dependency Injection)
- Strategy
- Thread-safe Connection Pool
- Observer
- Web-sockets
- Memento
- Proxy
- Spring Security
There is a web-application which represents a business processes in the warehouse. For running the app you need to download the latest version from the main branch and configure the web-server (if it's needed), the database and connection to it. Follow the next chapters.
For running the project you need the next:
- MySQL Community Server 8.0.33 - for running the app with database. Also, you can use another database. You can find the scripts of creating and adding data to the database in directory with name "database".
For downloading the project locally you can use two variants:
-
Download the ZIP archive from the repository page.
The method is easy, the next steps helps you:
- Find the button
Code
and press it. - Find the button
Download ZIP
and press it. The downloading must start. - Unzip the archive in soe directory and run the IDEA in this directory.
- Find the button
Project has been installed.
-
Use the
Git
for downloading the repository locally.The method a lit bit difficult, but the project will be downloaded with the help of several commands, and not manually, as in the previous method. For this method you need to install the
Git Bash
on your computer, make some configuration and have a primary skill of using this system of version control.-
Enter your name, email of GitHub account locally on your machine.
-
Create an empty directory and initialize it as git repository. Use the next command -
git init
. -
Adds this repository to yours with name
origin
(you can change it, if you want):$ git remote add origin git@github.com:StasonMendelso/University.KhNURE.DTaP.Practice.git
But you need configure your SSH connection to your GitHub profile in Git Bash. See more here.
For viewing that the repository has been added successfully to your local repository, you need execute the next command and get the following result:
$ git remote -v
After this step your local repository has got a 'connection' to the remote project from the GitHub repository.
-
For downloading the project use the following command:
$ git pull origin main
After these steps your project directory must contain the project files from GitHub repository. In addition to, you can create a new branch, make some changes and create a pull request for suggesting your improvements. Also, all changes are observed by the
git
and you can always make a rollback of all changesgit reset --hard
.
-
For running the database you can use MySQL Server or create your own database on another SQL server
using the script file of creating the database.
Note: if you use another server not such
MySQL you should change JDBC driver for working with it, maybe a code and configurate the connection to your
server in appropriate property file. If you change driver, you should
make some changes in pom.xml file
For running the code you needn't install server and configure it, because the Spring Boot starter makes it instead of you using the pom.xml.
You can find "application.properties" for configuration. This file contains configuration the application using the Spring Boot, so you can put your values to the file and run application with this application configuration. You can find more about configuration of Spring Boot application on the Internet.
For running the app on the server you need only run the main method in Java class. Also, you can package app to the jar file and deploy the file on the server manually.
Here you can find the screenshots of the web-application:
- Maven - Dependency Management
- Stanislav Hlova - All work - StasonMendelso