Skip to content

WilliamBy/StoreManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoodsManager

release license commit

Introduction

This is a simple web application for managing goods in your own store.

JRE 8+ as well as MySQL Server v8.0.30 is needed while running.

Features

  • User Login & Register
  • Keyword Search
  • Goods CRUD Operations
  • User Operations History Search

Technologies

Front-End

Technology Introduction Link
Layui Front-end framework layuiweb.com

Back-End

Technology Introduction Link
Java Programming language java.com
Spring Back-end framework spring.io
Spring Boot Boot the development of your Spring project Spring Boot
MyBatis Persistence framework mybatis, mybatis/spring-boot-starter
MySQL Open source database MySQL
JWT Authorization Token Lib JSON Web Tokens - jwt.io

Development

  • Project Instructure
# back-end code in 'GoodsManager/src/main/java'
java
  └─com
      └─example
          └─goodsmanager
              ├─auth	# authorization utility
              ├─config	# configurations
              ├─controller # web controller
              ├─domain	# domain classes
              └─mapper	# mybatis mapper
              
# front-end code in 'GoodsManager/src/main/resources/static'
static
├── index.html
├── js
│   ├── add.js
│   ├── edit.js
│   ├── login.js
│   ├── manage.js
│   ├── register.js
│   └── util.js
├── layui
└── pages
    ├── add.html
    ├── edit.html
    ├── login.html
    ├── manage.html
    └── register.html
git clone <url>
  • Get into directory GoodsManager
cd ./StoreManager/GoodsManager
  • Execute maven goals to generate *.jar
mvn clean package

Deployment & Usage

  • Download jar file from release

  • Make sure JRE 8+ and MySQL Server v8.0.30 are installed (any other version was not tested)

  • Set environment variable JAVA_HOME properly and check it by:

java --version
  • Start MySQL Server
  • Create Database using CREATE DATABASE IF NOT EXISTS goods_db;
  • Run commands like follow (filling your own config on using "-D" flag):
java -DMYSQL_USERNAME=xxx -DMYSQL_PASSWORD=xxx -DSECRET=xxx -DMYSQL_HOST=xxx -jar GoodsManager-<version>.jar
  • Config Parameter Table
Parameter Explain Default Value
MYSQL_USERNAME MySQL Server username root
MYSQL_PASSWORD MySQL Server password /
MYSQL_HOST MySQL Service Host localhost
MYSQL_PORT MySQL Service Port 3360
WEB_PORT Web Service Port 80
SECRET Secret key for generating jwt token secret
  • Just visit http://<domain>:<port>
  • If you want the application to run after leaving window, refer to tools tmux or screen