[免费]SpringBoot+Vue共享单车信息系统【论文+源码+SQL脚本】

大家好,我是java1234_小锋老师,看到一个不错的SpringBoot+Vue共享单车信息系统【论文+源码+SQL脚本】,分享下哈。

项目视频演示

【免费】SpringBoot+Vue共享单车信息系统 Java毕业设计_哔哩哔哩_bilibili

项目介绍

快速发展的社会中,人们的生活水平都在提高,生活节奏也在逐渐加快。为了节省时间和提高工作效率,越来越多的人选择利用互联网进行线上打理各种事务然后线上管理系统也就相继涌现。他们不仅希望页面简单大方,还希望操作方便,可以快速锁定他们需要的线上管理方式。基于这种情况,我们需要这样一个界面简单大方、功能齐全的系统来解决用户问题,满足用户需求。

课题主要分为大模块:即管理员模块和用户模块,主要功能包括:用户、区域、共享单车、单车租赁、租赁归还、报修信息、检修信息等;

系统展示

部分代码

package com.controller;import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.YonghuEntity;
import com.entity.view.YonghuView;import com.service.YonghuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;/*** 用户* 后端接口* @author * @email * @date 2023-03-24 22:41:10*/
@RestController
@RequestMapping("/yonghu")
public class YonghuController {@Autowiredprivate YonghuService yonghuService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", username));if(u==null || !u.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(u.getId(), username,"yonghu",  "用户" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody YonghuEntity yonghu){//ValidatorUtils.validateEntity(yonghu);YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", yonghu.getYonghuzhanghao()));if(u!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();yonghu.setId(uId);yonghuService.insert(yonghu);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");YonghuEntity u = yonghuService.selectById(id);return R.ok().put("data", u);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", username));if(u==null) {return R.error("账号不存在");}u.setMima("123456");yonghuService.updateById(u);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,YonghuEntity yonghu,HttpServletRequest request){EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,YonghuEntity yonghu, HttpServletRequest request){EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( YonghuEntity yonghu){EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu")); return R.ok().put("data", yonghuService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(YonghuEntity yonghu){EntityWrapper< YonghuEntity> ew = new EntityWrapper< YonghuEntity>();ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu")); YonghuView yonghuView =  yonghuService.selectView(ew);return R.ok("查询用户成功").put("data", yonghuView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){YonghuEntity yonghu = yonghuService.selectById(id);return R.ok().put("data", yonghu);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){YonghuEntity yonghu = yonghuService.selectById(id);return R.ok().put("data", yonghu);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(yonghu);YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", yonghu.getYonghuzhanghao()));if(u!=null) {return R.error("用户已存在");}yonghu.setId(new Date().getTime());yonghuService.insert(yonghu);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(yonghu);YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", yonghu.getYonghuzhanghao()));if(u!=null) {return R.error("用户已存在");}yonghu.setId(new Date().getTime());yonghuService.insert(yonghu);return R.ok();}/*** 修改*/@RequestMapping("/update")@Transactionalpublic R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){//ValidatorUtils.validateEntity(yonghu);yonghuService.updateById(yonghu);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){yonghuService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<YonghuEntity> wrapper = new EntityWrapper<YonghuEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = yonghuService.selectCount(wrapper);return R.ok().put("count", count);}}
<template><div><div class="container" :style='{"minHeight":"100vh","backgroundAttachment":"fixed","alignItems":"flex-end","background":"#A5DDDD","display":"flex","width":"100%","backgroundSize":"cover","backgroundPosition":"center center","backgroundRepeat":"no-repeat","justifyContent":"flex-end"}'><el-form :style='{"padding":"0 0px 20px","boxShadow":"0px 0px 0px 50px rgba(255,255,255,0.3000)","margin":"0","borderColor":"rgba(221,242,242,1)","borderRadius":"30px 0 0 0","background":"#fff","borderWidth":"30px 0 0 30px","width":"60%","borderStyle":"solid","height":"700px"}'><div v-if="true" :style='{"padding":"40px 0","margin":"0 0 50px 0","color":"#000","borderRadius":"0 0 30px 30px","textAlign":"center","background":"#A5DDDD","width":"100%","lineHeight":"1","fontSize":"24px","fontWeight":"bold"}' class="title-container">基于Spring Boot共享单车信息系统的设计与实现登录</div><div v-if="loginType==1" class="list-item" :style='{"width":"40%","margin":"0 auto 10px","alignItems":"center","flexWrap":"wrap","display":"flex"}'><div v-if="false" class="lable" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>用户名</div><input :style='{"border":"1px solid #A7A7A7","padding":"0 10px","boxShadow":"0 0 0px rgba(64, 158, 255, .5)","color":"#000","borderRadius":"30px","width":"100%","fontSize":"14px","height":"44px"}' placeholder="请输入用户名" name="username" type="text" v-model="rulesForm.username"></div><div v-if="loginType==1" class="list-item" :style='{"width":"40%","margin":"0 auto 10px","alignItems":"center","flexWrap":"wrap","display":"flex"}'><div v-if="false" class="lable" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>密码:</div><input :style='{"border":"1px solid #A7A7A7","padding":"0 10px","boxShadow":"0 0 0px rgba(64, 158, 255, .5)","color":"#000","borderRadius":"30px","width":"100%","fontSize":"14px","height":"44px"}' placeholder="请输入密码" name="password" type="password" v-model="rulesForm.password"></div><div :style='{"width":"40%","margin":"20px auto"}' v-if="roles.length>1" prop="loginInRole" class="list-type"><el-radio v-for="item in roles" v-bind:key="item.roleName" v-model="rulesForm.role" :label="item.roleName">{{item.roleName}}</el-radio></div><div :style='{"width":"40%","margin":"40px auto 0","alignItems":"center","flexDirection":"column","justifyContent":"center","display":"flex"}'><el-button v-if="loginType==1" :style='{"border":"0","cursor":"pointer","padding":"0 24px","margin":"0 10px","outline":"none","color":"#fff","borderRadius":"5px","background":"#A5DDDD","width":"100%","fontSize":"18px","height":"44px"}' type="primary" @click="login()" class="loginInBt">登录</el-button><br></div></el-form></div></div>
</template>
<script>import menu from "@/utils/menu";
export default {data() {return {baseUrl:this.$base.url,loginType: 1,rulesForm: {username: "",password: "",role: "",code: '',},menus: [],roles: [],tableName: "",codes: [{num: 1,color: '#000',rotate: '10deg',size: '16px'},{num: 2,color: '#000',rotate: '10deg',size: '16px'},{num: 3,color: '#000',rotate: '10deg',size: '16px'},{num: 4,color: '#000',rotate: '10deg',size: '16px'}],};},mounted() {let menus = menu.list();this.menus = menus;for (let i = 0; i < this.menus.length; i++) {if (this.menus[i].hasBackLogin=='是') {this.roles.push(this.menus[i])}}},created() {this.getRandCode()},destroyed() {},methods: {//注册register(tableName){this.$storage.set("loginTable", tableName);this.$storage.set("pageFlag", "register");this.$router.push({path:'/register'})},// 登陆login() {if (!this.rulesForm.username) {this.$message.error("请输入用户名");return;}if (!this.rulesForm.password) {this.$message.error("请输入密码");return;}if(this.roles.length>1) {if (!this.rulesForm.role) {this.$message.error("请选择角色");return;}let menus = this.menus;for (let i = 0; i < menus.length; i++) {if (menus[i].roleName == this.rulesForm.role) {this.tableName = menus[i].tableName;}}} else {this.tableName = this.roles[0].tableName;this.rulesForm.role = this.roles[0].roleName;}this.$http({url: `${this.tableName}/login?username=${this.rulesForm.username}&password=${this.rulesForm.password}`,method: "post"}).then(({ data }) => {if (data && data.code === 0) {this.$storage.set("Token", data.token);this.$storage.set("role", this.rulesForm.role);this.$storage.set("sessionTable", this.tableName);this.$storage.set("adminName", this.rulesForm.username);this.$router.replace({ path: "/index/" });} else {this.$message.error(data.msg);}});},getRandCode(len = 4){this.randomString(len)},randomString(len = 4) {let chars = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k","l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v","w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G","H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R","S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2","3", "4", "5", "6", "7", "8", "9"]let colors = ["0", "1", "2","3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]let sizes = ['14', '15', '16', '17', '18']let output = [];for (let i = 0; i < len; i++) {// 随机验证码let key = Math.floor(Math.random()*chars.length)this.codes[i].num = chars[key]// 随机验证码颜色let code = '#'for (let j = 0; j < 6; j++) {let key = Math.floor(Math.random()*colors.length)code += colors[key]}this.codes[i].color = code// 随机验证码方向let rotate = Math.floor(Math.random()*60)let plus = Math.floor(Math.random()*2)if(plus == 1) rotate = '-'+rotatethis.codes[i].rotate = 'rotate('+rotate+'deg)'// 随机验证码字体大小let size = Math.floor(Math.random()*sizes.length)this.codes[i].size = sizes[size]+'px'}},}
};
</script><style lang="scss" scoped>
.container {min-height: 100vh;position: relative;background-repeat: no-repeat;background-position: center center;background-size: cover;background: #A5DDDD;.list-item /deep/ .el-input .el-input__inner {border: 1px solid #A7A7A7;border-radius: 30px;padding: 0 10px;box-shadow: 0 0 0px rgba(64, 158, 255, .5);color: #000;width: 100%;font-size: 14px;height: 44px;}.list-code /deep/ .el-input .el-input__inner {border: 1px solid #A7A7A7;border-radius: 30px;padding: 0 10px;outline: none;color: #000;width: calc(100% - 20px);font-size: 14px;height: 44px;}.list-type /deep/ .el-radio__input .el-radio__inner {background: rgba(53, 53, 53, 0);border-color: #666666;}.list-type /deep/ .el-radio__input.is-checked .el-radio__inner {background: #000;border-color: #000;}.list-type /deep/ .el-radio__label {color: #666666;font-size: 14px;}.list-type /deep/ .el-radio__input.is-checked+.el-radio__label {color: #000;font-size: 14px;}
}
</style>

源码下载

链接:https://pan.baidu.com/s/1QlVUSov9MsnjghqnCqQ-Fg
提取码:1234

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/diannao/88172.shtml
繁体地址,请注明出处:http://hk.pswp.cn/diannao/88172.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

内网提权-DC-3靶场实验(Ubantu16.04)

靶场地址 https://download.vulnhub.com/dc/DC-3-2.zip 打开DC-3 使用kali扫描获取靶场ip 目录扫描获取后台地址 弱口令admin/snoopy进入后台 此处可写入一句话木马 创建文件写入一句话木马 哥斯拉上线 使用lsb_release -a命令查看内核版本 方法一 使用ubuntu漏洞库发现该…

Nginx:互斥锁 accept_mutex配置

如何配置 Nginx 的互斥锁 accept_mutex 1. 理解 accept_mutex 的作用 accept_mutex 是 Nginx 用于控制多工作进程&#xff08;worker processes&#xff09;接收新连接时避免「惊群问题&#xff08;Thundering Herd&#xff09;」的机制。 启用时&#xff08;accept_mutex o…

aws(学习笔记第四十六课) codepipeline-build-deploy

文章目录 aws(学习笔记第四十六课) codepipeline-build-deploy学习内容:1. 代码链接及整体架构1.1 代码链接1.2 整体架构1.2.1 初始化阶段的`codecommit repo`以及`codebuild project`设定1.2.2 创建`vpc`,`public alb`,`alb listener`以及`fargate service`等1.2.3 创建`so…

Vue 项目中的组件职责划分评审与组件设计规范制定

在现代前端系统中&#xff0c;Vue&#xff08;无论是 2.x 还是 3.x&#xff09;提供了良好的组件化机制&#xff0c;为构建复杂交互系统打下了基础。然而&#xff0c;随着项目规模增长&#xff0c;组件职责不清、代码重叠、维护困难等问题频发&#xff0c;严重影响开发效率与可…

react 的过渡动画

一、React的过渡动画 1、react-transition-group 在开发中&#xff0c;我们想要给一个组件的显示和消失&#xff0c;添加某种过渡动画&#xff0c;可以很好的增加用户体验&#xff0c; React社区为我们提供了react-transition-group用来完成过渡动画&#xff0c; React曾为…

深度学习:PyTorch人工神经网络优化方法分享(1)

本文目录&#xff1a; 一、从梯度角度入手&#xff08;一&#xff09;梯度下降算法回顾&#xff08;二&#xff09;常用优化算法1.SGD&#xff08;Stochastic Gradient Descent&#xff09;- 随机梯度下降2.BGD (Batch Gradient Descent) - 批量梯度下降3.MBGD (Mini-Batch Gra…

(三)yolov5——模型训练

一、准备数据 先准备一个MP4的视频 1.测试一帧 使用opencv来提取每一个视频的帧 先使用以下代码查看一帧的内容&#xff0c;是否符合预期 import cv2 import matplotlib.pyplot as plt# 打开视频文件 video cv2.VideoCapture("111.mp4") # 读取一帧 ret, frame…

008 Linux 开发工具(下) —— make、Makefile、git和gdb

&#x1f984; 个人主页: 小米里的大麦-CSDN博客 &#x1f38f; 所属专栏: Linux_小米里的大麦的博客-CSDN博客 &#x1f381; GitHub主页: 小米里的大麦的 GitHub ⚙️ 操作环境: Visual Studio 2022 文章目录 Linux 开发工具&#xff08;下&#xff09;Linux 项目自动化构建工…

前缀和题目:连续的子数组和

文章目录 题目标题和出处难度题目描述要求示例数据范围 解法思路和算法代码复杂度分析 题目 标题和出处 标题&#xff1a;连续的子数组和 出处&#xff1a;523. 连续的子数组和 难度 5 级 题目描述 要求 给定一个整数数组 nums \texttt{nums} nums 和一个整数 k \tex…

队的简单介绍

队列&#xff1a;只允许在一端进行插入数据操作&#xff0c;在另一端进行删除数据操作的特殊线性表&#xff0c;队列具有先进先出 FIFO(First In First Out)的特点。 入队列&#xff1a;进行插入操作的一端称为队尾。 出队列&#xff1a;进行删除操作的一端称为队头。 入队列…

AI-Sphere-Butler之如何将豆包桌面版对接到AI全能管家~新玩法(一)

环境&#xff1a; AI-Sphere-Butler VBCABLE2.1.58 Win10专业版 豆包桌面版1.47.4 ubuntu22.04 英伟达4070ti 12G python3.10 问题描述&#xff1a; AI-Sphere-Butler之如何将豆包桌面版对接到AI全能管家~新玩法&#xff08;一&#xff09; 聊天视频&#xff1a; AI真…

【STM32】启动流程

1、.s启动文件解析 STM32的启动文件&#xff08;一般是.s汇编文件&#xff0c;如startup_stm32f407xx.s&#xff09;是STM32上电后执行的第一段代码&#xff0c;承担着“系统初始化化引导员”的角色。 它的主要作用是设置初始化栈指针&#xff08;SP&#xff09;、程序计数器&…

【vim】通过vim编辑器打开、修改、退出配置文件

通过vim编辑器打开任一配置文件 vim /etc/profile 英文输入下&#xff0c;按i键进入INSERT模式&#xff0c;修改配置文件 完成修改后&#xff0c;按esc键退出INSERT模式 英文输入下&#xff0c;输入":wq!"&#xff0c;即可保存并退出 :q #不保存并退出 :q! …

Effective Modern C++ 条款6:当 auto 推导类型不符合预期时,使用显式类型初始化惯用法

在C开发中&#xff0c;auto关键字以其简洁性和高效性被广泛使用。然而&#xff0c;“自动推导”并非万能&#xff0c;尤其在某些特殊场景下&#xff0c;auto的推导结果可能与开发者预期不符&#xff0c;甚至导致未定义行为。今天&#xff0c;我们以《Effective Modern C》条款6…

学习Linux进程冻结技术

原文&#xff1a;蜗窝科技Linux进程冻结技术 功耗中经常需要用到&#xff0c;但是linux这块了解甚少&#xff0c;看到这个文章还蛮适合我阅读的 1 什么是进程冻结 进程冻结技术&#xff08;freezing of tasks&#xff09;是指在系统hibernate或者suspend的时候&#xff0c;将…

GitHub 趋势日报 (2025年06月22日)

&#x1f4ca; 由 TrendForge 系统生成 | &#x1f310; https://trendforge.devlive.org/ &#x1f310; 本日报中的项目描述已自动翻译为中文 &#x1f4c8; 今日获星趋势图 今日获星趋势图 624 LLMs-from-scratch 523 ai-engineering-hub 501 n8n 320 data-engineer-handb…

kotlin中为什么新增扩展函数功能?

在 Kotlin 中&#xff0c;扩展函数的本质是「不修改原有类代码&#xff0c;为其新增功能」&#xff0c;这源自编程中「开闭原则」&#xff08;对扩展开放&#xff0c;对修改关闭&#xff09;的第一性原理。 核心需求&#xff1a;当需要给第三方库的类&#xff08;如 Android 的…

excel 数据透视表介绍

Excel 数据透视表(PivotTable)就是你的数据分析神器!它能帮你快速汇总、分类、比较和分析 大量数据&#xff0c;从看似杂乱无章的表格中一键提取关键信息 &#xff0c;生成交互式的汇总报告。无需复杂公式&#xff0c;只需拖拽几下&#xff0c;就能让数据“开口说话”&#xff…

半导体行业中的专用标准产品ASSP是什么?

半导体行业中的专用标准产品ASSP是什么&#xff1f; “专用标准产品”&#xff08;ASSP - Application Specific Standard Product&#xff09;是半导体集成电路中的一个重要分类。 你可以把它理解为介于通用标准产品和全定制ASIC之间的一种芯片。以下是它的核心定义和特点&a…

秋招Day14 - MySQL - 锁

MySQL中有几种类型的锁&#xff1f; 锁粒度来分&#xff0c;有表锁、页锁和行锁。 加锁机制划分&#xff0c;有乐观锁和悲观锁。 按兼容性划分&#xff0c;有共享锁和排他锁。 按锁模式划分&#xff0c;有记录锁&#xff0c;间隙锁&#xff0c;next-key锁&#xff0c;意向锁…