黑马程序员java项目 : 瑞吉外卖

基于SpringBoot、MybatisPlus、MariaDB、Redis、vue实现,开发环境使用IDEA、Chrome、Sqlyog

代码已经同步到GitHub:https://github.com/SiriusCao/reggie_take_out

完成了教学中的全部内容,并自己实现了教学中没有提到的业务,所有业务功能基本都实现了。另外,短信验证码登录这一块改用了redis实现,同时在前端增加了一些功能,比如在订单查询页面增加了图片显示、后台订单管理显示详情等。最后还完善了一些不合理的地方。

基本就增删改查,没有复杂业务,虽然有一些坑,但都是可以解决的,适合新手拿来练手。

1、环境

jdk1.8

maven3.6

mysql或者MariaDB(都可以)

Redis

2、配置

配置文件在reggie_take_out\src\main\resources\application.yml
可以修改port(端口号)、url username password(数据库地址、用户名、密码)、redis下的host port(redis的地址和端口)、pic_path(图片存储地址)

server:
  #端口号
  port: 8080
spring:
  application:
    #应用的名称,可选
    name: reggie_take_out
  datasource:
    druid:
      driver-class-name: com.mysql.cj.jdbc.Driver
      #数据库地址
      url: jdbc:mysql://localhost:3306/reggie?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
      #数据库用户名和密码
      username: root
      password: 123456
  redis:
    #redis的地址和端口
    host: localhost
    port: 6379
mybatis-plus:
  configuration:
    #在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      id-type: ASSIGN_ID

reggie:
  #图片储存地址
  pic-path: D:\img\

3、导入idea后启动项目

项目启动成功

android spring androidspringboot订餐项目_数据库


启动redis

android spring androidspringboot订餐项目_java_02

打开浏览器访问http://127.0.0.1:8080/front/page/login.html

因为是移动端页面,需要在浏览器当中按F12,然后点击下面绿色箭头指示的地方,即可显示移动端页面。

android spring androidspringboot订餐项目_android spring_03


输入手机号,点击发送验证码,可在idea控制台当中看到打印的验证码

android spring androidspringboot订餐项目_数据库_04

输入验证码后即可登录

android spring androidspringboot订餐项目_android spring_05


android spring androidspringboot订餐项目_java_06

android spring androidspringboot订餐项目_数据库_07


android spring androidspringboot订餐项目_spring_08


输入http://127.0.0.1:8080/backend/page/login/login.html打开后台管理页面,用户名和密码分别为admin和123456,也可用其他的非管理员员工登录,员工表在employee,密码均为123456,

android spring androidspringboot订餐项目_spring_09

android spring androidspringboot订餐项目_java_10