preface

With the rapid development of the Internet era, convenient people’s life, improve the quality of life, the food delivery system came into being. People also like to enjoy the treatment of “stay at home, food home”, prompting the rapid development of online food ordering industry.

flash-waimai

  • A complete takeout system, including mobile terminal, background management, API
  • Delivery system based on Spring Boot and VUE
  • Contains complete mobile terminal, background management functions
  • This project is mainly for exchange study, not recommended for commercial use.

Technology selection

  • Core framework: Spring Boot
  • Database layer: Spring Data JPA /Spring Data mongodb
  • Database connection pool: Druid
  • Cache: Ehcache
  • Front end: Vue. Js
  • Database: mysql5.5 +,Mongodb4.0(don’t use latest version 4.2)

The module

  • Flash-waimai-mobile mobile terminal site
  • Flash-waimai-manage Background management system
  • Flash-waimai-api Java interface service
  • Flash-waimai-core Underlying core module
  • Flash-waimai-generate code generation module

Quick start

  • Data stores use mysql and mongodb. Basic management configuration data is stored in mysql and service data is stored in mongodb.
  • Create mysql database
    CREATE DATABASE IF NOT EXISTS waimai DEFAULT CHARSET utf8 COLLATE utf8_general_ci; 
    CREATE USER 'waimai'@'%' IDENTIFIED BY 'waimai123';
    GRANT ALL privileges ON waimai.* TO 'waimai'@'%';
    flush privileges;
Copy the code
  • After the mysql database is created, the flash-Waimai-API service will automatically initialize the data, without the need for developers to manually initialize the data themselves
  • Install mongo and create database: flash – waimai use mongorestore command import mongo data, because of the large amount of test data, packaged in baidu cloud disk: link: pan.baidu.com/s/1mfO7yckF… Extract code: apGD after downloading, extract the file to D :\elm and import the data with the following command:
mongorestore.exe -d flash-waimai d:\\elm
Copy the code
  • Download the project the picture of the test data (merchants and food pictures) : link: pan.baidu.com/s/1rvZDspoa… Extract code: urzw, save the image in t_sys_cfg table system.file.upload.path in the specified directory

  • Start the management platform:

  • Enter the flash-Waimai-manage directory:

  • Run NPM install — registry.npm.taobao.org

  • Run NPM run dev

  • After the startup is successful, visit http://localhost:9528 and log in. The user name and password are admin and admin

  • Start the mobile phone:

  • Enter the Flash-Waimai-Mobile directory:

  • Run NPM install — registry.npm.taobao.org

  • Run NPM run local

  • After the startup is successful, visit http://localhost:8000

Running effect drawing

  • Background management

  • Mobile terminal

conclusion

Take-out business has experienced many leapfrog development since its establishment. The rapid growth of the business has put forward higher and higher requirements for the overall architecture and infrastructure of the system, and also constantly drives the technical team to deeply understand the business, accurately locate the domain model, and efficiently support the expansion of the system. (This project is mainly for exchange study, not recommended for commercial use!) Full version of the Java interview questions address: Java backend questions integration and source sharing