克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

仿小米商城后端服务

介绍

模拟小米官网的后端服务

项目运行环境

jdk 1.8+
maven 3.6.3+
springboot 2.*
mybatis-plus 3.2.0+
mysql 5.7+
redis 6.2.1

后端运行先配置数据库(mysql 和redis)

代码地址Gitee

代码地址GitHub

server:
  port: 8081
spring:
  application:
    name: mi-springboot
  #数据库配置  start
  datasource:
    druid:
      type: com.alibaba.druid.pool.DruidDataSource
      url: jdbc:mysql://localhost:3306/mi-mal?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&useSSL=false
      username: root
      password: 123456
      driver-class-name: com.mysql.jdbc.Driver
      # 初始化配置
      initial-size: 3
      # 最小连接数
      min-idle: 3
      # 最大连接数
      max-active: 15
      # 获取连接超时时间
      max-wait: 5000
      # 连接有效性检测时间
      time-between-eviction-runs-millis: 90000
      # 最大空闲时间
      min-evictable-idle-time-millis: 1800000
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
      validation-query: select 1
      # 配置监控统计拦截的filters
      filters: stat
      stat-view-servlet:
        url-pattern: /druid/*
        reset-enable: false
        login-username: admin
        login-password: admin
        allow: 127.0.0.1
        enabled: true   #默认值为true,即打开监控页面,但存在泄漏信息的风险,所以修改为false
      web-stat-filter:
        url-pattern: /*
        exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"
  #redis 配置
  redis:
    host: localhost
    port: 6379
    password: 123456
    database: 10
    jedis:
      pool:
        max-active: 8
        max-wait: 5s
        min-idle: 0
        max-idle: 8

点击启动类启用服务

@SpringBootApplication
public class UserApplication {

    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class);
    }
}

前端启动

项目地址https://gitee.com/gitxys/mi_vue

代码地址Gitee

代码地址GitHub

控制台先安装依赖包

npm install 

然后运行下面代码即可启动

npm run serve

页面介绍

浏览器输入http://localhost:8080 将看到一下页面

登录:用户名/密码 admin/123456

image-20211219223115929

购物车

image-20211219223220837

订单确认

image-20211219223323684

订单结算(彩蛋!!!! 这里的结算做了特殊处理)

image-20211219223406482

订单列表

image-20211219223507791

亲,留个star 吧

MIT License Copyright (c) <year> <copyright holders> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

仿小米官网简单版前端,后端地址:https://gitee.com/gitxys/mi_springboot 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化