在线创建

https://start.spring.io/

依赖项

Spring Boot核心包

        <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>

mybatis依赖

        <dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.3</version>
</dependency>

mysql驱动(注意需要去掉runtime,否则报错)

        <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>

通用工具包

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
</dependency>

跨域身份验证解决方案 Json web token包

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.7.0</version>
</dependency>

高性能缓存组件

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>

完整pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>net.ybclass</groupId>
<artifactId>online_ybclass</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>online_ybclass</name>
<description>Demo project for Spring Boot</description> <properties>
<java.version>1.8</java.version>
</properties> <dependencies>
<!-- Spring Boot 核心包开始 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Spring Boot 核心包结束 -->
<!-- mybatis依赖 开始 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.3</version>
</dependency>
<!-- mybatis依赖 结束 --> <!-- mysql依赖 开始 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- mysql依赖 结束 -->
<!-- 通用工具包 开始-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
</dependency>
<!-- 通用工具包 结束--> <!-- 跨域身份验证解决方案Json web token包 开始 -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.7.0</version>
</dependency>
<!-- 跨域身份验证解决方案Json web token包 结束 -->
<!-- guava 高性能缓存组件 开始 -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<!-- guava 高性能缓存组件 结束 -->
</dependencies> <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build> </project>

项目基本包结构

实体类创建

Chapter.java

package net.ybclass.online_ybclass.domain;

import java.util.Date;

/**
* 章
*/
public class Chapter {
private Integer id;
private Integer videoId;
private String title;
private Integer ordered;
private Date createTime; public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public Integer getVideoId() {
return videoId;
} public void setVideoId(Integer videoId) {
this.videoId = videoId;
} public String getTitle() {
return title;
} public void setTitle(String title) {
this.title = title;
} public Integer getOrdered() {
return ordered;
} public void setOrdered(Integer ordered) {
this.ordered = ordered;
} public Date getCreateTime() {
return createTime;
} public void setCreateTime(Date createTime) {
this.createTime = createTime;
} @Override
public String toString() {
return "Chapter{" +
"id=" + id +
", videoId=" + videoId +
", title='" + title + '\'' +
", ordered=" + ordered +
", createTime=" + createTime +
'}';
}
}

Episode.java

package net.ybclass.online_ybclass.domain;

import java.util.Date;

/**
* 集
*/
public class Episode {
private Integer id;
private String title;
private Integer num;
private Integer ordered;
private String playUrl;
private Integer chapterId;
private Integer free;
private Integer videoId;
private Date createTime; public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getTitle() {
return title;
} public void setTitle(String title) {
this.title = title;
} public Integer getNum() {
return num;
} public void setNum(Integer num) {
this.num = num;
} public Integer getOrdered() {
return ordered;
} public void setOrdered(Integer ordered) {
this.ordered = ordered;
} public String getPlayUrl() {
return playUrl;
} public void setPlayUrl(String playUrl) {
this.playUrl = playUrl;
} public Integer getChapterId() {
return chapterId;
} public void setChapterId(Integer chapterId) {
this.chapterId = chapterId;
} public Integer getFree() {
return free;
} public void setFree(Integer free) {
this.free = free;
} public Integer getVideoId() {
return videoId;
} public void setVideoId(Integer videoId) {
this.videoId = videoId;
} public Date getCreateTime() {
return createTime;
} public void setCreateTime(Date createTime) {
this.createTime = createTime;
} @Override
public String toString() {
return "Episode{" +
"id=" + id +
", title='" + title + '\'' +
", num=" + num +
", ordered=" + ordered +
", playUrl='" + playUrl + '\'' +
", chapterId=" + chapterId +
", free=" + free +
", videoId=" + videoId +
", createTime=" + createTime +
'}';
}
}

User.java

package net.ybclass.online_ybclass.domain;

import java.util.Date;

/**
* 用户
*/
public class User {
private Integer id;
private String name;
private String pwd;
private String headImg;
private String phone;
private Date createTime; public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getName() {
return name;
} public void setName(String name) {
this.name = name;
} public String getPwd() {
return pwd;
} public void setPwd(String pwd) {
this.pwd = pwd;
} public String getHeadImg() {
return headImg;
} public void setHeadImg(String headImg) {
this.headImg = headImg;
} public String getPhone() {
return phone;
} public void setPhone(String phone) {
this.phone = phone;
} public Date getCreateTime() {
return createTime;
} public void setCreateTime(Date createTime) {
this.createTime = createTime;
} @Override
public String toString() {
return "User{" +
"id=" + id +
", name='" + name + '\'' +
", pwd='" + pwd + '\'' +
", headImg='" + headImg + '\'' +
", phone='" + phone + '\'' +
", createTime=" + createTime +
'}';
}
}

Video.java

package net.ybclass.online_ybclass.domain;

import java.util.Date;

/**
* 视频对象
*/
public class Video {
private Integer id;
private String title;
private String summary;
private String converImg;
private Integer price;
private Date createTime;
private Double point; public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getTitle() {
return title;
} public void setTitle(String title) {
this.title = title;
} public String getSummary() {
return summary;
} public void setSummary(String summary) {
this.summary = summary;
} public String getConverImg() {
return converImg;
} public void setConverImg(String converImg) {
this.converImg = converImg;
} public Integer getPrice() {
return price;
} public void setPrice(Integer price) {
this.price = price;
} public Date getCreateTime() {
return createTime;
} public void setCreateTime(Date createTime) {
this.createTime = createTime;
} public Double getPoint() {
return point;
} public void setPoint(Double point) {
this.point = point;
} @Override
public String toString() {
return "Video{" +
"id=" + id +
", title='" + title + '\'' +
", summary='" + summary + '\'' +
", converImg='" + converImg + '\'' +
", price=" + price +
", createTime=" + createTime +
", point=" + point +
'}';
}
}

VideoBanner.java

package net.ybclass.online_ybclass.domain;

import java.util.Date;

/**
* 视频轮播图
*/
public class VideoBanner {
private Integer id;
private String url;
private String img;
private Date createTime;
private Integer weight; public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getUrl() {
return url;
} public void setUrl(String url) {
this.url = url;
} public String getImg() {
return img;
} public void setImg(String img) {
this.img = img;
} public Date getCreateTime() {
return createTime;
} public void setCreateTime(Date createTime) {
this.createTime = createTime;
} public Integer getWeight() {
return weight;
} public void setWeight(Integer weight) {
this.weight = weight;
} @Override
public String toString() {
return "VideoBanner{" +
"id=" + id +
", url='" + url + '\'' +
", img='" + img + '\'' +
", createTime=" + createTime +
", weight=" + weight +
'}';
}
}

VideoOrder.java

package net.ybclass.online_ybclass.domain;

import java.util.Date;

/**
* 订单
*/
public class VideoOrder {
private Integer id;
private String outTradeNo;
private Integer state;
private Date createTime;
private Integer totalFee;
private Integer videoId;
private String videoTitle;
private String videoImg;
private Integer userId; public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getOutTradeNo() {
return outTradeNo;
} public void setOutTradeNo(String outTradeNo) {
this.outTradeNo = outTradeNo;
} public Integer getState() {
return state;
} public void setState(Integer state) {
this.state = state;
} public Date getCreateTime() {
return createTime;
} public void setCreateTime(Date createTime) {
this.createTime = createTime;
} public Integer getTotalFee() {
return totalFee;
} public void setTotalFee(Integer totalFee) {
this.totalFee = totalFee;
} public Integer getVideoId() {
return videoId;
} public void setVideoId(Integer videoId) {
this.videoId = videoId;
} public String getVideoTitle() {
return videoTitle;
} public void setVideoTitle(String videoTitle) {
this.videoTitle = videoTitle;
} public String getVideoImg() {
return videoImg;
} public void setVideoImg(String videoImg) {
this.videoImg = videoImg;
} public Integer getUserId() {
return userId;
} public void setUserId(Integer userId) {
this.userId = userId;
} @Override
public String toString() {
return "VideoOrder{" +
"id=" + id +
", outTradeNo='" + outTradeNo + '\'' +
", state=" + state +
", createTime=" + createTime +
", totalFee=" + totalFee +
", videoId=" + videoId +
", videoTitle='" + videoTitle + '\'' +
", videoImg='" + videoImg + '\'' +
", userId=" + userId +
'}';
}
}

yb课堂 新版SSM-SpringBoot2.X 后端项目框架搭建 《二》的更多相关文章

  1. MongoDB从入门到实战之.NET Core使用MongoDB开发ToDoList系统(1)-后端项目框架搭建

    前言: 前面的四个章节我们主要讲解了MongoDB的相关基础知识,接下来我们就开始进入使用.NET7操作MongoDB开发一个ToDoList系统实战教程. MongoDB从入门到实战的相关教程 Mo ...

  2. .Net Core3.0 WebApi 项目框架搭建 二:API 文档神器 Swagger

    .Net Core3.0 WebApi 项目框架搭建:目录 为什么使用Swagger 随着互联网技术的发展,现在的网站架构基本都由原来的后端渲染,变成了:前端渲染.后端分离的形态,而且前端技术和后端技 ...

  3. openjpa框架入门_项目框架搭建(二)

    Openjpa2.2+Mysql+Maven+Servlet+JSP 首先说明几点,让大家更清楚整体结构: 官方source code 下载:http://openjpa.apache.org/dow ...

  4. .Net Core3.0 WebApi 项目框架搭建:目录

    一.目录 .Net Core3.0 WebApi 项目框架搭建 一:实现简单的Resful Api .Net Core3.0 WebApi 项目框架搭建 二:API 文档神器 Swagger .Net ...

  5. ssm项目框架搭建(增删改查案例实现)——(SpringMVC+Spring+mybatis项目整合)

    Spring 常用注解 内容 一.基本概念 1. Spring 2. SpringMVC 3. MyBatis 二.开发环境搭建 1. 创建 maven 项目 2. SSM整合 2.1 项目结构图 2 ...

  6. (三) Angular2项目框架搭建心得

    前言: 在哪看到过angular程序员被React程序员鄙视,略显尴尬,确实Angular挺值得被调侃的,在1.*版本存在的几个性能问题,性能优化的"潜规则"贼多,以及从1.*到2 ...

  7. Angular企业级开发(5)-项目框架搭建

    1.AngularJS Seed项目目录结构 AngularJS官方网站提供了一个angular-phonecat项目,另外一个就是Angular-Seed项目.所以大多数团队会基于Angular-S ...

  8. 权限管理系统之项目框架搭建并集成日志、mybatis和分页

    前一篇博客中使用LayUI实现了列表页面和编辑页面的显示交互,但列表页面table渲染的数据是固定数据,本篇博客主要是将固定数据变成数据库数据. 一.项目框架 首先要解决的是项目框架问题,搭建什么样的 ...

  9. go语言实战教程:实战项目资源导入和项目框架搭建

    从本节内容开始,我们将利用我们所学习的Iris框架的相关知识,进行实战项目开发. 实战项目框架搭建 我们的实战项目是使用Iris框架开发一个关于本地服务平台的后台管理平台.平台中可以管理用户.商品.商 ...

  10. .Net Core3.0 WebApi 项目框架搭建 五: 轻量型ORM+异步泛型仓储

    .Net Core3.0 WebApi 项目框架搭建:目录 SqlSugar介绍 SqlSugar是国人开发者开发的一款基于.NET的ORM框架,是可以运行在.NET 4.+ & .NET C ...

随机推荐

  1. C#应用的用户配置窗体方案 - 开源研究系列文章

    这次继续整理以前的代码.本着软件模块化的原理,这次笔者对软件中的用户配置窗体进行剥离出来,单独的放在一个Dll类库里进行操作,这样在其它应用程序里也能够快速的复用该类库,达到了快速开发软件的效果. 笔 ...

  2. win10 使用idea 构建一个ssm的模板maven项目

    一.创建一个maven项目   1.1建立一个module作为web项目   File->New->project 选择maven,默认jdk,下面的列表什么都不选,next->输入 ...

  3. skipped: maximum number of running instances reached (1)

    apscheduler定时任务报错skipped: maximum number of running instances reached (1) 原因是默认max_instances最大定时任务是1 ...

  4. [N1盒子] Armbian安装Docker+Portainer汉化面板支持小钢炮汉化+中英文切换方法

    1.下载汉化包,解压后备用链接:https://pan.baidu.com/s/1BLXMSmJFcgESeNMhQL26Mg&shfl=sharepset提取码:6vjr 以下安装,国内建议 ...

  5. 如何判断7z压缩文件格式

    如果压缩文件的后缀不是7z,那么如何如何判断文件格式呢?那就是通过文件头判断. 7z文件头前6位,固定是:377ABCAF271C,其中前两位37.7A分别是"7""z& ...

  6. Specs satisfying the `flutter_twitter (from `.symlinks/plugins/flutter_twitter/ios`)` dependency were found, but they required a higher minimum deployment target

    MXFlutter的依赖发生变化,需要将iOS最低系统版本提高 修改之后,进入到MXFlutter目录,执行 flutter run 发现编译错误 咨询了下,mxflutter需要flutter为 用 ...

  7. WNS 后台Push服务调试脚本

    一.API说明 https://cloud.tencent.com/document/product/276/3212   二.推送脚本 #!/usr/local/bin/python3 # -*- ...

  8. js 禁用右键菜单和禁止复制

    大江东去,浪淘尽,千古风流人物.故垒西边,人道是,三国周郎赤壁.乱石穿空,惊涛拍岸,卷起千堆雪.江山如画,一时多少豪杰.遥想公瑾当年,小乔初嫁了,雄姿英发.羽扇纶巾,谈笑间,樯橹灰飞烟灭.故国神游,多 ...

  9. JavaScript语法形式1行内式

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. kettle从入门到精通 第二十九课 job 循环 检验字段的值

    1.平常我们在用kettle设计job的时候,会用到循环来处理一些业务逻辑,比如循环检测某个表中的数据条数等.这个时候就会用到一个特别重要的步骤:检验字段的值. 下图是一个的通过初始化DNOE变量为f ...