基于javaweb+mysql的springboot学习平台管理系统(java+springboot+vue+elementui+layui+mysql)

基于javaweb+mysql的springboot学习平台管理系统(java+springboot+vue+elementui+layui+mysql)

运行环境

Java≥8、MySQL≥5.7、Node.js≥10

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行

前端:WebStorm/VSCode/HBuilderX等均可

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb+mysql的SpringBoot学习平台管理系统(java+springboot+vue+elementui+layui+mysql)

项目介绍

基于SpringBoot和Vue的学习平台:

在平台首页可以查看首页,课程信息,作业信息,资料信息,校园论坛,试卷,公告信息,个人中心,后台管理等内容进行详细操作

角色:管理员、学生、教师

管理员:管理员登录系统后,可以对首页,个人中心,学生管理,教师管理,课程信息管理,类型管理,作业信息管理,资料信息管理,签到信息管理,成绩统计管理,学生作业管理,试卷管理,试题管理,校园论坛,系统管理等功能模块进行相应操作

学生:学习平台,在平台首页可以查看首页,课程信息,作业信息,资料信息,校园论坛,试卷,公告信息,个人中心,后台管理等内容进行详细操作

教师:教师登录进入学习平台,可以对首页,个人中心,课程信息管理,作业信息管理,资料信息管理,签到信息管理,成绩统计管理,学生作业管理等功能进行相应操作

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7/8.0版本均可; 5.是否Maven项目:是;

技术栈

1.后端:SpringBoot+Mybaits 2.前端:Vue +ElementUI +Layui +HTML+CSS+JS

使用说明

项目运行: 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入项目地址:http://localhost:8080/springbootm55rv/front/index.html 注:项目所在路径不能存在中文、空格等特殊字符 管理员: abo/abo 用户: 学号1/123456 教师:工号1/123456


List<Curelation> curelationList = curelationService.queryAll(course);

List<Course> dataList = new ArrayList<>();

for (int i = 0; i < curelationList.size(); i++) {

Course curelation = courseService.selectByPrimaryKey(curelationList.get(i).getCourseid());

dataList.add(curelation);

JSONObject json = new JSONObject();

return json.toJSONString(dataList);

@RequestMapping("suggeetion")

public String suggeetion(HttpServletRequest request, Coursecomment coursecomment){

List<Coursecomment> coursecomments = coursecommentService.queryAll(coursecomment);

request.setAttribute("list",coursecomments);

return "suggeetion";

@RequestMapping("view")


power1.setRoleid(powerid);

power1.setId(String.valueOf(Math.random()).substring(2, 8));

powerService.insert(power1);

depotService.insert(role);

return "redirect:/Role/queryAll";

@ResponseBody

@RequestMapping("/queryOne")

public String queryOne(String ID){

JSONObject json = new JSONObject();

Role depot = new Role();

Power power = new Power();

power.setId(ID);

System.out.println(ID);


course = list.get(0);

JSONObject json = new JSONObject();

return json.toJSONString(course);

@RequestMapping("addComment")

public String addComment(HttpServletRequest request, Coursecomment coursecomment){

User user = (User) request.getSession().getAttribute("user");

coursecomment.setCreatetime(DateUtil.getStringToday());

coursecomment.setUserid(user.getName());

coursecomment.setId(String.valueOf(Math.random()).substring(2,10));

coursecommentService.insert(coursecomment);


user.setType(Constans.STUDENT);

userService.insert(user);

return "redirect:/User/student";

@ResponseBody

@RequestMapping("/queryOne")

public String queryOne(String ID){

User user = new User();

user.setId(ID);

List<User> list = userService.QueryAll(user);

user = list.get(0);

JSONObject json = new JSONObject();


@RequestMapping("/updatePa")

public String updatePa(String userID,String password){

User user = new User();

System.out.println(userID);

User user1 = userService.selectByPrimaryKey(userID);

user1.setPassword(password);

userService.updateByPrimaryKey(user1);

return "Main";

@RequestMapping("/delete")

public String delete(String ID){

userService.deleteByPrimaryKey(ID);


/*String type = "1";

if ("1".equals(user.getType())){

type="2";

course.setType(type);

course.setUserid(user.getId());*/

List<Curelation> curelationList = curelationService.queryAll(course);

List<Course> dataList = new ArrayList<>();

for (int i = 0; i < curelationList.size(); i++) {

Course curelation = courseService.selectByPrimaryKey(curelationList.get(i).getCourseid());

dataList.add(curelation);


ModelAndView mav = new ModelAndView();

User user1 = userService.selectByPrimaryKey(id);

if(user1 == null || !password.equals(user1.getPassword())){

mav.setViewName("index");

request.getSession().setAttribute("info", "error");

return mav;

}else{

Role role = new Role();

role.setRoleid(user1.getRoleid());

List<Role> list =roleService.QueryAll(role);

role =list.get(0);
List<Course> list = courseService.queryAll(course);

request.setAttribute("list",list);

return "course";

@RequestMapping("/receive")

public String receive(HttpServletRequest request, HttpServletResponse response, MultipartFile file){

try {

//也可以用request获取上传文件

//MultipartFile  fileFile = request.getFile("file"); //这里是页面的name属性

//转换成输入流

InputStream is = file.getInputStream();


Power power = powerService.selectByPrimaryKey(role.getPowerid());

if(!StringUtil.isNullOrEmpty(power.getPower())){

request.getSession().setAttribute("power", power.getPower());

String time = DateUtil.getStringToday();

request.getSession().setAttribute("time", time);

request.getSession().setAttribute("user", user1);

mav.setViewName("redirect:/User/Main");

return mav;

@RequestMapping("/updateStudent")

public String update(User user){

userService.updateByPrimaryKey(user);

return "redirect:/User/student";

@RequestMapping("/updateTeacher")

User user = userService.selectByPrimaryKey(notice.getUserid());

notice.setUserid(user.getName());

request.getSession().setAttribute("notice", notice);

return "Main";

@RequestMapping("/changePa")

public String res1(){

return "changePass";

@RequestMapping("/Login")

public ModelAndView login(HttpServletRequest request,String id,String password) throws Exception{

ModelAndView mav = new ModelAndView();

User user1 = userService.selectByPrimaryKey(id);


@RequestMapping("/queryOne")

public String queryOne(String ID){

Course course = new Course();

course.setId(ID);

List<Course> list = courseService.queryAll(course);

course = list.get(0);

JSONObject json = new JSONObject();

return json.toJSONString(course);

@RequestMapping("add")

public String addCourse(Course course){

course.setId(String.valueOf(Math.random()).substring(2, 10));


request.getSession().setAttribute("info", "quit");

mav.setViewName("index");

return mav;

角色管理控制层:

@Controller

@RequestMapping("/Role")

public class RoleController {

@Autowired

private RoleService depotService;

@Autowired

private PowerService powerService;

public ModelAndView quit(HttpServletRequest request) throws Exception{

ModelAndView mav = new ModelAndView();

HttpSession session1 = request.getSession();

session1.invalidate();

request.getSession().setAttribute("info", "quit");

mav.setViewName("index");

return mav;

角色管理控制层:

@Controller

@RequestMapping("/Role")

public class RoleController {

@Autowired

private RoleService depotService;

return "redirect:/Course/student";

@ResponseBody

@RequestMapping("/queryOne")

public String queryOne(String ID){

Course course = new Course();

course.setId(ID);

List<Course> list = courseService.queryAll(course);

course = list.get(0);

JSONObject json = new JSONObject();

return json.toJSONString(course);

@RequestMapping("add")


//得到列数

int colsNum = sheet.getColumns();

//得到行数

int rowsNum = sheet.getRows();

//单元格

Cell cell;

Cell cell1;

List<Map> list = new ArrayList<>();

Map<Integer, String> map = new HashMap<Integer, String>();

for (int i = 1; i < rowsNum; i++) {//我的excel第一行是标题,所以 i从1开始

cell  = sheet.getCell(0,i);

cell1 = sheet.getCell(5,i);


public String QueryAllTeacherjson(HttpServletRequest request,User user){

List<User> list = userService.QueryAllTeacher(user);

JSONObject json = new JSONObject();

return json.toJSONString(list);

@RequestMapping("/student")

public String QueryAllStudent(HttpServletRequest request,User user){

List<User> list = userService.QueryAllStudent(user);

request.setAttribute("list", list);

if(null != user.getName()){

request.setAttribute("name", user.getName());

if(null != user.getMobile()){

request.setAttribute("mobile", user.getMobile());

return "student";


public String update2(HttpServletRequest request,Course course){

User user = (User) request.getSession().getAttribute("user");

Curelation curelation = new Curelation();

curelation.setUserid(user.getId());

curelation.setCourseid(course.getId());

List<Curelation> curelationList = curelationService.queryAll(curelation);

if(curelationList.size() == 0){

curelation.setId(String.valueOf(Math.random()).substring(2, 10));

curelation.setType("1");

curelationService.insert(curelation);

String data = json.toJSONString(user);

return data;

@RequestMapping("/quit")

public ModelAndView quit(HttpServletRequest request) throws Exception{

ModelAndView mav = new ModelAndView();

HttpSession session1 = request.getSession();

session1.invalidate();

request.getSession().setAttribute("info", "quit");

mav.setViewName("index");

return mav;

角色管理控制层:

@Controller

@RequestMapping("/Role")

public class RoleController {

请添加图片描述

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值