当前位置: 首页 > news >正文

SpringBoot+Vue大学生在线考试平台源码+论文

代码可以查看文章末尾⬇️联系方式获取,记得注明来意哦~🌹
分享万套开题报告+任务书+答辩PPT模板
作者完整代码目录供你选择:
《SpringBoot网站项目》1800套
《SSM网站项目》1500套
《小程序项目》1600套
《APP项目》1500套
《Python网站项目》1300套
⬇️文章末尾可以获取联系方式,需要源码或者演示视频可以联系⬇️
⚡感兴趣大家可以点点关注收藏,后续更新更多项目资料。⚡

采用技术:

编程语言:Java
后端框架:SpringBoot
前端框架:Vue
数据库:MySQL
数据表数量:20张表
运行软件:IDEA、Eclipse、VS Code都可以

系统功能:


本系统实现管理员、学生、教师模块。
管理员模块功能:管理员、学生、教师、试卷管理、试题管理、试题库管理、考试记录、作弊记录、成绩信息、班级成绩、资料分享、资料分类、论坛交流、公告信息、菜单、试卷列表等。
学生模块功能:考试记录、错题本、资料分享、我的发布、我的收藏、试卷列表、论坛交流、公告信息、教师等。
教师模块功能:试卷管理、试题管理、试题库管理、考试记录、作弊记录、成绩信息、班级成绩、试卷列表、资料分享、论坛交流、公告信息、教师等。

运行截图:





















论文目录:



核心代码:

packagecom.controller;importjava.text.SimpleDateFormat;importcom.alibaba.fastjson.JSONObject;importjava.util.*;importorg.springframework.beans.BeanUtils;importjavax.servlet.http.HttpServletRequest;importorg.springframework.web.context.ContextLoader;importjavax.servlet.ServletContext;importcom.service.TokenService;importcom.utils.StringUtil;importjava.lang.reflect.InvocationTargetException;importcom.service.DictionaryService;importorg.apache.commons.lang3.StringUtils;importcom.annotation.IgnoreAuth;importorg.slf4j.Logger;importorg.slf4j.LoggerFactory;importorg.springframework.beans.factory.annotation.Autowired;importorg.springframework.stereotype.Controller;importorg.springframework.web.bind.annotation.*;importcom.baomidou.mybatisplus.mapper.EntityWrapper;importcom.baomidou.mybatisplus.mapper.Wrapper;importcom.entity.YonghuEntity;importcom.service.YonghuService;importcom.entity.view.YonghuView;importcom.utils.PageUtils;importcom.utils.R;@RestController@Controller@RequestMapping("/yonghu")publicclassYonghuController{privatestaticfinalLoggerlogger=LoggerFactory.getLogger(YonghuController.class);@AutowiredprivateYonghuServiceyonghuService;@AutowiredprivateTokenServicetokenService;@AutowiredprivateDictionaryServicedictionaryService;//级联表service/** * 后端列表 */@RequestMapping("/page")publicRpage(@RequestParamMap<String,Object>params,HttpServletRequestrequest){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));params.put("orderBy","id");PageUtilspage=yonghuService.queryPage(params);//字典表数据转换List<YonghuView>list=(List<YonghuView>)page.getList();for(YonghuViewc:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c);}returnR.ok().put("data",page);}/** * 后端详情 */@RequestMapping("/info/{id}")publicRinfo(@PathVariable("id")Longid){logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);YonghuEntityyonghu=yonghuService.selectById(id);if(yonghu!=null){//entity转viewYonghuViewview=newYonghuView();BeanUtils.copyProperties(yonghu,view);//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view);returnR.ok().put("data",view);}else{returnR.error(511,"查不到数据");}}/** * 后端保存 */@RequestMapping("/save")publicRsave(@RequestBodyYonghuEntityyonghu,HttpServletRequestrequest){logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());Wrapper<YonghuEntity>queryWrapper=newEntityWrapper<YonghuEntity>().eq("username",yonghu.getUsername()).or().eq("yonghu_phone",yonghu.getYonghuPhone()).or().eq("yonghu_id_number",yonghu.getYonghuIdNumber());;logger.info("sql语句:"+queryWrapper.getSqlSegment());YonghuEntityyonghuEntity=yonghuService.selectOne(queryWrapper);if(yonghuEntity==null){yonghu.setCreateTime(newDate());yonghu.setPassword("123456");// String role = String.valueOf(request.getSession().getAttribute("role"));// if("".equals(role)){// yonghu.set// }yonghuService.insert(yonghu);returnR.ok();}else{returnR.error(511,"账户或者身份证号或者手机号已经被使用");}}/** * 后端修改 */@RequestMapping("/update")publicRupdate(@RequestBodyYonghuEntityyonghu,HttpServletRequestrequest){logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());//根据字段查询是否有相同数据Wrapper<YonghuEntity>queryWrapper=newEntityWrapper<YonghuEntity>().notIn("id",yonghu.getId()).andNew().eq("username",yonghu.getUsername()).or().eq("yonghu_phone",yonghu.getYonghuPhone()).or().eq("yonghu_id_number",yonghu.getYonghuIdNumber());;logger.info("sql语句:"+queryWrapper.getSqlSegment());YonghuEntityyonghuEntity=yonghuService.selectOne(queryWrapper);if("".equals(yonghu.getYonghuPhoto())||"null".equals(yonghu.getYonghuPhoto())){yonghu.setYonghuPhoto(null);}if(yonghuEntity==null){// String role = String.valueOf(request.getSession().getAttribute("role"));// if("".equals(role)){// yonghu.set// }yonghuService.updateById(yonghu);//根据id更新returnR.ok();}else{returnR.error(511,"账户或者身份证号或者手机号已经被使用");}}/** * 删除 */@RequestMapping("/delete")publicRdelete(@RequestBodyInteger[]ids){logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());yonghuService.deleteBatchIds(Arrays.asList(ids));returnR.ok();}/** * 登录 */@IgnoreAuth@RequestMapping(value="/login")publicRlogin(Stringusername,Stringpassword,Stringcaptcha,HttpServletRequestrequest){YonghuEntityyonghu=yonghuService.selectOne(newEntityWrapper<YonghuEntity>().eq("username",username));if(yonghu==null||!yonghu.getPassword().equals(password)){returnR.error("账号或密码不正确");}Stringtoken=tokenService.generateToken(yonghu.getId(),username,"yonghu","用户");Rr=R.ok();r.put("token",token);r.put("role","用户");r.put("username",yonghu.getYonghuName());r.put("tableName","yonghu");r.put("userId",yonghu.getId());returnr;}/** * 注册 */@IgnoreAuth@PostMapping(value="/register")publicRregister(@RequestBodyYonghuEntityyonghu){// ValidatorUtils.validateEntity(user);if(yonghuService.selectOne(newEntityWrapper<YonghuEntity>().eq("username",yonghu.getUsername()).orNew().eq("yonghu_phone",yonghu.getYonghuPhone()).orNew().eq("yonghu_id_number",yonghu.getYonghuIdNumber()))!=null){returnR.error("账户已存在或手机号或身份证号已经被使用");}yonghuService.insert(yonghu);returnR.ok();}/** * 重置密码 */@GetMapping(value="/resetPassword")publicRresetPassword(Integerid){YonghuEntityyonghu=newYonghuEntity();yonghu.setPassword("123456");yonghu.setId(id);yonghuService.updateById(yonghu);returnR.ok();}/** * 获取用户的session用户信息 */@RequestMapping("/session")publicRgetCurrYonghu(HttpServletRequestrequest){Integerid=(Integer)request.getSession().getAttribute("userId");YonghuEntityyonghu=yonghuService.selectById(id);returnR.ok().put("data",yonghu);}/** * 退出 */@GetMapping(value="logout")publicRlogout(HttpServletRequestrequest){request.getSession().invalidate();returnR.ok("退出成功");}}t("data",yonghu);}/** * 退出 */@GetMapping(value="logout")publicRlogout(HttpServletRequestrequest){request.getSession().invalidate();returnR.ok("退出成功");}}ession().invalidate();returnR.ok("退出成功");}}t("data",yonghu);}/** * 退出 */@GetMapping(value="logout")publicRlogout(HttpServletRequestrequest){request.getSession().invalidate();returnR.ok("退出成功");}}
http://www.gsyq.cn/news/1458551.html

相关文章:

  • 【C++11新章】一篇文章搞懂 std::initializer_list 模板类
  • 别再傻傻分不清:图解SCCB与I2C在时序上的关键三处不同(附示波器实测波形)
  • 别再被TB6600吓到了!用拇指大的A4988驱动42步进电机,51单片机/STM32/FPGA三平台代码实测
  • 告别寄存器恐惧:用Arduino+PlatformIO一步步调通SX1262 LoRa模块(附完整代码)
  • 中国人民大学研究团队打造的“多模态深度研究助手“
  • 微信小程序智慧物业系统源码包:支持云开发与本地部署,含报修投票、装修申请等完整功能
  • 【ST+梯形图混用实战:什么时候用什么,一张表说清楚】
  • 告别密码地狱:用Keycloak 18分钟搞定企业级单点登录与权限管理(Spring Boot实战)
  • 光伏电池片裂纹检测MATLAB工程包:含SVM模型、40组标注.mat图像与完整处理流程
  • 如何用PDFMathTranslate在30分钟内完成学术论文的精准翻译
  • 如何做微信投票链接,云帆投票小程序快速搭建教程 - 投票小程序
  • 别再死磕OLED了!用STM32F103驱动HMI串口屏,5分钟搞定交互界面(附完整代码)
  • M2.7工程化落地:面向研发工程师的AI工作流闭环模型
  • 手把手教你用Arduino UNO给ATmega168P烧录Bootloader(附USBasp备用方案)
  • 告别串口打印:用STM32 HAL库+DS18B20做个OLED屏显温度计(Keil工程开源)
  • CVE-2026-42945漏洞分析及复现
  • 实战演练:基于快马AI构建高可靠kafka订单事件驱动微服务系统
  • 彻底理清 B+ 树页分裂与页合并对大批量写入 MySQL分库分表与分区表的设计抉择 数据时吞吐量的影响路径
  • AD软件大电流布线必备:一招把Top层铺铜“变成”阻焊开窗,告别焊盘锡量不足的烦恼
  • 深入GL3224固件升级工具:如何手动添加Flash芯片支持(以Winbond W25Q16为例)
  • NarratoAI完整教程:三步掌握AI视频解说制作神器
  • AUTOSAR SPI实战避坑:同步调用Spi_SyncTransmit阻塞了CPU?试试异步Spi_AsyncTransmit提升效率
  • 用MATLAB批量生成卫星TLE文件:STK11自动化脚本实战(附完整代码)
  • 别再用BertModel直接喂给Chroma了!手写一个EmbeddingFunction解决HuggingFaceEmbeddings离线调用难题
  • Python 爬虫进阶技巧:批量解析 html 实体转义字符还原原始文本
  • 2026深度测评10款降AI率软件红黑榜!优缺点全曝光,达标率直接对标行业天花板
  • 用FPGA控制步进电机是种什么体验?从状态机到分频器,详解Verilog驱动A4988全流程
  • Apex Legends智能压枪助手终极指南:10分钟掌握精准射击
  • Spring AI Alibaba-ChatClient
  • MATLAB环境下可直接运行的KNN分类代码包:含主程序、核心函数与调用说明