springboot+vue项目之搭建

一、项目技术栈

本项目采用前后端分离技术。

前端技术:vue3,JavaScript;

后端框架:springboot框架+mybatis-plus;

数据库:MySQL,Redis作为热点数据缓存。

二、项目环境搭建

1、数据库

采用mysql+Navicat Premium 15

序号表名说明
1employee员工表
2categoty_class菜品和套餐分类表(商家自己维护)
3product商家信息表
4dish_flavor菜品口味关系表
5contamer用户表(c端)
6address_book地址簿表
7shopping_cart购物车表
8orders订单表
9order_detail订单明细表
10sys_dict_type通用数据字典类型表
11sys_dict_data通用数据类型明细表
12enterprise_process商家审核意见表

2、Maven项目搭建

后台:springboot  2.7.15 +mybatis-plus +redis+hutool

前端:vue 3 +element-ui+vue-router+vuex+百度地图(坐标定位,位置搜索和显示)

3、创建项目

在Idea中勾选相应的选项,创建springboot项目。

4、导入依赖

<!-- mybatis-plus  -->
<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-boot-starter</artifactId>
    <version>3.5.2</version>
</dependency>



<!-- java常用工具集合 https://www.hutool.cn/  -->
<dependency>
    <groupId>cn.hutool</groupId>
    <artifactId>hutool-all</artifactId>
    <version>5.8.2</version>
</dependency>

<!-- 文档编写工具 -->
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-boot-starter</artifactId>
    <version>3.0.0</version>
</dependency>

<!--可视化的文档页面 swagger-ui-->
<dependency>
    <groupId>com.github.xiaoymin</groupId>
    <artifactId>knife4j-spring-boot-starter</artifactId>
    <version>3.0.2</version>
</dependency>

<!-- 对mybatis扩展的分页框架(支持各种数据库) -->
<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper-spring-boot-starter</artifactId>
    <version>1.4.7</version>
</dependency>

<!-- 图片验证框工s具 -->
<dependency>
    <groupId>com.github.whvcse</groupId>
    <artifactId>easy-captcha</artifactId>
    <version>1.6.2</version>
</dependency>

<!-- 对实体类数据有效性的验证框架 -->
<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator</artifactId>
</dependency>

<!--redisson分布式锁 -->
<dependency>
    <groupId>org.redisson</groupId>
    <artifactId>redisson-spring-boot-starter</artifactId>
    <version>3.17.6</version>
</dependency>


 <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop -->
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-aop</artifactId>
</dependency>

<dependency>
	<groupId>com.alibaba</groupId>
	<artifactId>easyexcel</artifactId>
	<version>3.2.1</version>
</dependency>

<!--        <dependency>-->
<!--            <groupId>org.springframework.boot</groupId>-->
<!--            <artifactId>spring-boot-starter-data-mongodb</artifactId>-->
<!--        </dependency>-->

<dependency>
	<groupId>com.tencentcloudapi</groupId>
	<artifactId>tencentcloud-sdk-java</artifactId>
	<!-- go to https://search.maven.org/search?q=tencentcloud-sdk-java and get the latest version. -->
	<!-- 请到https://search.maven.org/search?q=tencentcloud-sdk-java查询所有版本,最新版本如下 -->
	<version>3.1.899</version>
</dependency>

<!-- 腾讯云文件存储SDK -->
<dependency>
	<groupId>com.qcloud</groupId>
	<artifactId>cos_api</artifactId>
</dependency>
	<version>5.6.133</version>

4、配置application.yml文件

#application.yml
server:
  port: 8080
spring:
  application:
    #应用名称 , 可选
    name: market_sys
  profiles:
    # 程序启动,加载-dev开发环境
    active: dev
  jackson:
    time-zone: GMT+8
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher

以及开发环境配置(application-dev.yml),生产环境配置(application-prod.yml)

5、使用mybatis-plus可视化工具逆向过程

连接数据库,选择所需要的表。这里所选择的是mybatis-plus3,需要的entity,mapper,service包工具会自动创建。

三、前端 

基于https://gitee.com/hu-snail/vue3-admin-element-template项目框架进行修改,可进行自行下载。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值