Vue+Spring Boot+MyBatis实现Eshop电子商城(已烂尾,等以后有时间再继续完善)

文章目录

  • asp.net必修课项目(Java实现):EShop数码商城
    • 前言
    • 项目介绍
    • 预计主要实现的功能
    • 系统架构
      • 前端架构
      • 后端架构
    • 后端部分内容的具体实现
      • 注1:项目初始化及其所要引入的依赖
      • 1. 用户模块

asp.net必修课项目(Java实现):EShop数码商城

前言

给自己:
		这学期开了asp.net  由于正在学Java的一些框架于是打算采Vue+Springboot+Mybatis 完成必修课所要完成的项目,在本篇文章中后端只将几个重点功能写出用于记录,由于本人技术水平有限,如若有错还希望多多包涵并指正。

项目介绍

	Eshop网络商城是基于Spring Boot、Vue.js、MyBatis、Element UI等主流前后端技术,采用前后端分离架构实现的简易网上购物商城。

预计主要实现的功能

  • 系统登录:系统用户登录
  • 用户管理:用户注册,用户登录(用户注册登录都采用邮箱验证方式且注册登录一体
  • 商品分类
  • 商品模块
  • 购物车模块
  • 收货地址模块
  • 支付模块
  • 订单模块

系统架构

前端架构

	该项目采用前后端分离的架构模式,前端采用的核心框架是Vue.js,使用了饿了么团队开源的ElementUI库,使用Axios进行前后端通信

前端架构图如下
Vue+Spring Boot+MyBatis实现Eshop电子商城(已烂尾,等以后有时间再继续完善)_第1张图片

后端架构

	该项目采用前后端分离的架构模式,后端采用的核心框架是Springboot,MyBatis
框架

后端架构图如下
Vue+Spring Boot+MyBatis实现Eshop电子商城(已烂尾,等以后有时间再继续完善)_第2张图片

后端部分内容的具体实现

注1:项目初始化及其所要引入的依赖


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0modelVersion>
    <parent>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-parentartifactId>
        <version>2.5.4version>
        <relativePath/> 
    parent>
    <groupId>com.kcgroupId>
    <artifactId>eshopartifactId>
    <version>0.0.1-SNAPSHOTversion>
    <name>eshopname>
    <description>Demo project for Spring Bootdescription>
    <properties>
        <java.version>1.8java.version>
    properties>


    <dependencies>

        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-webartifactId>
        dependency>

        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-testartifactId>
            <scope>testscope>
        dependency>

        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>druidartifactId>
            <version>1.2.4version>
        dependency>
        
        <dependency>
            <groupId>mysqlgroupId>
            <artifactId>mysql-connector-javaartifactId>
            <version>5.1.38version>
        dependency>
        
        <dependency>
            <groupId>org.mybatis.spring.bootgroupId>
            <artifactId>mybatis-spring-boot-starterartifactId>
            <version>2.1.4version>
        dependency>
        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-devtoolsartifactId>
            <optional>trueoptional>
        dependency>

        <dependency>
            <groupId>org.projectlombokgroupId>
            <artifactId>lombokartifactId>
            <optional>trueoptional>
        dependency>

        
        <dependency>
            <groupId>io.springfoxgroupId>
            <artifactId>springfox-swagger2artifactId>
            <version>2.6.1version>
        dependency>
        <dependency>
            <groupId>io.springfoxgroupId>
            <artifactId>springfox-swagger-uiartifactId>
            <version>2.6.1version>
        dependency>

        <dependency>
            <groupId>org.apache.commonsgroupId>
            <artifactId>commons-lang3artifactId>
            <version>3.9version>
        dependency>

        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-mailartifactId>
        dependency>



    dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-maven-pluginartifactId>
            plugin>
        plugins>
    build>

project>

1. 用户模块

  • 文件结构展示
  • 数据库表设计
  • 用户实体类
  • 用户登录注册功能实现
  • 用户登录的拦截器实现

文件结构
Vue+Spring Boot+MyBatis实现Eshop电子商城(已烂尾,等以后有时间再继续完善)_第3张图片

数据库表设计
Vue+Spring Boot+MyBatis实现Eshop电子商城(已烂尾,等以后有时间再继续完善)_第4张图片
用户实体类

package com.kc.entity;

import lombok.Data;

import java.lang.reflect.Method;

@Data
public class Member {
    private int id;
    private String loginname;
    private String loginpwd;
    private String sex;
    private String birth;
    private String education;
    private String phone;
    private String adress;
    private String zip;
    private String email;
    private String regdate;
    private String latedate;
    private int logintimes;
    private int memberlevel;

    public Member(){

    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getLoginname() {
        return loginname;
    }

    public void setLoginname(String loginname) {
        this.loginname = loginname;
    }

    public String getLoginpwd() {
        return loginpwd;
    }

    public void setLoginpwd(String loginpwd) {
        this.loginpwd = loginpwd;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAdress() {
        return adress;
    }

    public void setAdress(String adress) {
        this.adress = adress;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRegdate() {
        return regdate;
    }

    public void setRegdate(String regdate) {
        this.regdate = regdate;
    }

    public String getLatedate() {
        return latedate;
    }

    public void setLatedate(String latedate) {
        this.latedate = latedate;
    }

    public int getLogintimes() {
        return logintimes;
    }

    public void setLogintimes(int logintimes) {
        this.logintimes = logintimes;
    }

    public int getMemberlevel() {
        return memberlevel;
    }

    public void setMemberlevel(int memberlevel) {
        this.memberlevel = memberlevel;
    }

    @Override
    public String toString() {
        return "member{" +
                "id=" + id +
                ", loginname='" + loginname + '\'' +
                ", loginpwd='" + loginpwd + '\'' +
                ", sex='" + sex + '\'' +
                ", birth='" + birth + '\'' +
                ", education='" + education + '\'' +
                ", phone='" + phone + '\'' +
                ", adress='" + adress + '\'' +
                ", zip='" + zip + '\'' +
                ", email='" + email + '\'' +
                ", regdate='" + regdate + '\'' +
                ", latedate='" + latedate + '\'' +
                ", logintimes=" + logintimes +
                ", memberlevel=" + memberlevel +
                '}';
    }
}

你可能感兴趣的:(Java程序设计,vue.js,spring,boot,java)