仓廪实则知礼节,衣食足则知荣辱。这篇文章主要讲述SpringBoot+Uniapp实战开发全新仿抖音短视频App相关的知识,希望能为你提供帮助。
??立即下载??
??立即下载??
短视频在未来几年都是风口,许多公司都在朝这个方向进行业务的拓展,蛋糕非常大。本课程将从0起步,带你使用最新SpringBoot技术结合Uniapp,完成当下流行的仿抖音短视频项目。通过完整的项目历练,无论是作为毕设,还是丰富项目经验,都会让你在众多竞争者中脱颖而出。
1、设计数据库表结构单纯的测试数据,结构不严谨。
create table if not exists activity
(id integer unsigned primary key auto_increment,
imgURL varchar(255) not null,
title varchar(255) not null,
classification varchar(255) not null,
address varchar(255) not null,
starttime varchar(255) not null,
endtime varchar(255) not null,
price varchar(255) not null,
info varchar(255) not null,
Regstarttime varchar(100) not null,
Regendtime varchar(100) not null,
sponsor varchar(100) not null);
1
2
3
4
5
6
7
8
9
10
11
12
13
2、插入数据
insert ignore into activity values
(null,
\\\\static\\\\activityImg\\\\activity2.jpg,
活动2标题,industry,
活动2地址,
20200202,
20200303,
3000,
活动2详情简介,
20200101,
20200130,
主办方2);
1
2
3
4
5
6
7
8
9
10
11
12
3、SpringBoot项目链接mysql数据库
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url = jdbc:mysql://IP地址:3306/数据库名称?useSSL=true&
characterEncoding=utf-8&
serverTimezone=PRC
spring.datasource.username = 帐号名称
spring.datasource.password = ‘’
server.port=8090
1
2
3
4
5
4、创建模块
package com.ths.activityMiniprogramServe.models;
public class ActivityList
private long id;
private String imgURL;
private String title;
private String classification;
private String address;
private String startTime;
private String endTime;
private String price;
private String info;
private String regStartTime;
private String regEndTime;
private String sponsor;
public ActivityList()
public ActivityList(String imgURL, String title, String classification, String address, String startTime, String endTime, String price, String info, String regStartTime, String regEndTime, String sponsor)
this.imgURL = imgURL;
this.title = title;
this.classification = classification;
this.address = address;
this.startTime = startTime;
this.endTime = endTime;
this.price = price;
this.info = info;
this.regStartTime = regStartTime;
this.regEndTime = regEndTime;
this.sponsor = sponsor;
// getter and setter
1
2
3
5、接口
@Mapper
public interface ActivityRepository
@Select("select * from activity")
public List<
ActivityList>
findAll();
@Select("select * from activity where classification = #classification")
public List<
ActivityList>
findByLife(String classification);
?
6、控制器
@RestController
@CrossOrigin
@RequestMapping("/api/ActivityList")
public class ApiController
@Autowired
private ActivityRepository repo;
@GetMapping("/life/page")
public List<
ActivityList>
index1(@PathVariable int page)
List<
ActivityList>
activity = repo.findByLife("life");
return activity;
@GetMapping("/industry/page")
public List<
ActivityList>
index2(@PathVariable int page)
List<
ActivityList>
activity = repo.findByLife("industry");
return activity;
@GetMapping("/study/page")
public List<
ActivityList>
index3(@PathVariable int page)
List<
ActivityList>
activity = repo.findByLife("study");
return activity;
@GetMapping("/parentChild/page")
public List<
ActivityList>
index4(@PathVariable int page)
List<
ActivityList>
activity = repo.findByLife("parentChild");
return activity;
【SpringBoot+Uniapp实战开发全新仿抖音短视频App】
推荐阅读
- 「2022」打算跳槽涨薪,必问面试题及答案 -- ECMAScript 篇#yyds干货盘点#
- 记一次文件编码格式导致命令执行不成功的错误--服务 tomcat 不支持 chkconfig
- 基于深度卷积神经网络的目标检测研究综述
- struts2中Action的三种开发编写形式,ActionSupport,POJO
- MacBook将大文件分割成很多个小文件split命
- 电脑开机显示节电模式,显示器显示不了,是什么原因()
- 使用 ReactSolidity 和 Web3.js 构建真实世界的 dApp#yyds干货盘点#
- React 配置化+Serverless,落地低代码+云原生全栈开发
- Oracle数据库的增删改,索引视图以及序列的创建和销毁