GithubHelp home page GithubHelp logo

sky-take-out's Introduction

苍穹外卖

本项目是使用 Spring Boot 框架开发的一个在线外卖订购系统。

技术栈

  • 后端框架
    • SpringBoot (2.7.3)
    • mybatis
  • 数据库
    • MySql
    • Redis
  • 前端框架
    • Vue
    • Uniapp
    • ElementUI
  • 前后端通信
    • RESTful API

Windows 开发环境搭建

  1. 安装 Java JDK 并配置环境变量

  2. 安装 MySQL、Redis 数据库并创建相应数据库

    • 创建 MySQL 数据库与表: 运行 sky.sql
  3. 安装 Maven 构建工具

  4. 下载安装 Nginx 并完成以下配置

    # 在 http 这一项下配置以下内容
    
    map $http_upgrade $connection_upgrade{
    	default upgrade;
    	'' close;
    }
    
    upstream webservers{
      server 127.0.0.1:8080 weight=90 ;
      #server 127.0.0.1:8088 weight=10 ;
    }
    
    server {
        listen       80;
        server_name  localhost;
    
        location / {
            root   html/sky;
            index  index.html index.htm;
        }
    
        # 反向代理,处理管理端发送的请求
        location /api/ {
    		proxy_pass   http://localhost:8080/admin/;
            #proxy_pass   http://webservers/admin/;
        }
    
    	# 反向代理,处理用户端发送的请求
        location /user/ {
            proxy_pass   http://webservers/user/;
        }
    
    	# WebSocket
    	location /ws/ {
            proxy_pass   http://webservers/ws/;
    		proxy_http_version 1.1;
    		proxy_read_timeout 3600s;
    		proxy_set_header Upgrade $http_upgrade;
    		proxy_set_header Connection "$connection_upgrade";
        }
    
        location /media {
            root 配置媒体文件位置; # eg: D:/static
            # 注:在 D:/static 目录下创建 media 文件夹
        }
    }
    
  5. 克隆项目到本地 git clone https://github.com/lisongkun/sky-take-out

  6. 修改配置文件 application.yml

    spring:
      datasource:
        url: jdbc:mysql://url
        username: root
        password: 数据库密码
      data:
        redis:
          password: redis数据库密码
  7. resources 目录下新建 application-env.yml 文件,写入以下配置

    sky:
      wechat:
        appid: 申请微信小程序可获得
        secret: 申请微信小程序可获得
        mchid: 商户号
        mchSerialNo:
        privateKeyFilePath:
        apiV3Key:
        weChatPayCertFilePath:
        notifyUrl:
        refundNotifyUrl:
  8. 运行项目

sky-take-out's People

Contributors

lisongkun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.