项目作者: TangliziGit

项目描述 :
A library management system
高级语言: CSS
项目地址: git://github.com/TangliziGit/Mandarin.git
创建时间: 2019-09-18T06:42:19Z
项目社区:https://github.com/TangliziGit/Mandarin

开源协议:

下载


Mandarin

A library management system.

Environment Requirement

Item Requirement
Memory 512 MB+
OS Windows 7+ / Linux 3.10.0+

Deployment Guide

We embedded Apache Tomcat 7 in Mandarin, and generate database schema automatically.
So the deployment is easy.

On Linux

As a demonstration, we chose two representative popular Linux distributions Ubuntu and Archlinux, while the other distributions can follow the following deployment process.
Also, if you have deployment experience, you can choose to deploy MySQL or the entire Mandarin project using a virtual environment such as docker.

  1. Install Java Runtime Environment 1.8

    1. # Ubuntu
    2. apt install openjdk-8-jre
    3. # Archlinux
    4. pacman -S jre8-openjdk
  2. Install MySQL Server 8.0+ and MySQL Client

MySQL Server

  1. # Ubuntu
  2. apt install mysql-server
  3. # Archlinux
  4. pacman -S mysql

MySQL Client (Optional)

  1. # ubuntu
  2. apt install mycli
  3. # Archlinux
  4. pacman -S mycli
  1. Create Mandarin database on MySQL

    1. mycli -u root
    2. > create database mandarin;
  2. Deploy Mandarin
    Copy mandarin-runner.jar to any path you want.
    E.g. you can put mandarin-runner.jar to /home/root/.

  3. Write Mandarin configuration
    you should put this file as a default configuration file on the same path as mandarin-runner.jar.
    ```bash
    spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
    spring.datasource.url=jdbc:mysql://localhost:3306/mandarin
    spring.datasource.username=root
    spring.datasource.password=YOUR_ROOT_PASSWORD

spring.jpa.hibernate.ddl-auto=create
logging.level.org.a3.mandarin=debug

spring.datasource.data=classpath:mandarin-data.sql
spring.datasource.initialization-mode=always

spring.main.allow-bean-definition-overriding=true
spring.jpa.show-sql=true

spring.mail.host=YOUR_EMAIL_HOST
spring.mail.username=YOUR_EMAIL_USERNAME
spring.mail.password=YOUR_EMAIL_PASSWORD
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtps.required=true.starttl

server.port=80

  1. Now your directory should be like this:
  2. ```bash
  3. .
  4. ├── application.properties
  5. └── mandarin-runner.jar
  6. 0 directories, 2 files
  1. (Optional) Import other data into Mandarin database
    You can change your default configuration file:

    1. spring.datasource.data=file:YOUR_SQL_FILE_PATH

    Or, use a MySQL Client:

    1. $ mycli -u root
    2. > use mandarin;
    3. > source ./other.sql;
  2. Run Mandarin

    1. java -jar mandarin-runner.jar

    visit http://HOST:PORT/ to enter reader index page.
    And http://HOST:PORT/admin/is the administrator’s entry