——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SpringBoot少年宫活动中心后台管理系统(java+springboot+thymeleaf+html+maven+mysql)
项目介绍
本项目是少年儿童活动中心的选课系统,本选课系统是基于SpringBoot2.0 + Mybatis + Thymeleaf + Shiro 开发的后台管理系统,建立以Browser/Server 为结构模式、以数据库为后台核心应用、以服务为目的信息化办公平台。实现对课程安排、报名缴费、数据记录和处理、工作流程的信息化,提高工作效率和数据管理效率,并具备安全性、可升级、可扩展性
面向对象
技术选型
SpringBoot + Mybatis + Thymeleaf + Shiro + Easyexcel + EhCache
功能列表
课程管理 管理活动中心的课程分类以及课程信息 - 教师管理 管理活动中心的授课教师信息 - 学员管理 和管理活动中心的学员信息 - 收费管理 查询学员课程的收费信息以及课程的收费报表 - 用户管理 管理后台系统用户,管理员身份可以进行修改、删除 - 角色管理 分配权限的最小单元,通过角色对用户分配权限 - 菜单管理 管理系统菜单,同时作为权限资源
日志管理 记录登录用户的地址和时间,以及未授权越界操作的记录
快速部署
环境与插件要求
Jdk8+ - Mysql5.5+ - Maven - Redis 3.2+
Lombok 重要
导入项目
IntelliJ IDEA:Import Project -> Import Project from external model -> Maven
Eclipse:Import -> Exising Mavne Project
准备数据
创建数据库,将项目sng.sql文件导入到mysql数据库中
修改配置
修改项目资源目录,application-dev.yml文件的datasource配置和redis配置
运行项目
运行项目SngApplication.java - 访问地址:http://localhost:8090/
默认帐号密码:admin/admin(其他账号密码在realpwd表中)
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| }
@RequiresPermissions(value = {"role:list","role:add"},logical = Logical.AND) @RequestMapping(value = "/edit",method = RequestMethod.GET) @ResponseBody public RoleFind toEditRole(Integer roleId){ return this.roleService.findRole(roleId); }
@RequiresPermissions(value = {"role:list","role:add"},logical = Logical.AND) @RequestMapping(value = "/edit",method = RequestMethod.POST) @ResponseBody public String editRole(@Valid RoleParam role, BindingResult br){ ValidationUtil.validateData(br); this.roleService.editRole(role); return "success"; }
@RequiresPermissions(value = {"role:list","role:add"},logical = Logical.AND) @RequestMapping(value = "/remove",method = RequestMethod.POST) @ResponseBody public String removeRole(Integer id){ return this.roleService.removeRole(id)?"success":"fail"; }
@RequiresPermissions(value = {"role:list","role:add"},logical = Logical.AND) @RequestMapping(value = "/recover",method = RequestMethod.POST)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| String fileName = URLEncoder.encode("学生信息表", "UTF-8"); response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); outputStream = response.getOutputStream(); EasyExcel.write(outputStream, StuInfo.class).sheet("学生信息表").doWrite(this.stuService.findStuInfo(Arrays.asList(stuIds))); } finally { try { if (outputStream != null) { outputStream.flush(); outputStream.close(); } } catch (IOException e) { e.printStackTrace(); } } } }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| * @param chargeParam * @param br * @return */ @RequestMapping(value = "/add", method = RequestMethod.POST) public String addCharge(@Valid ChargeParam chargeParam, BindingResult br) { ValidationUtil.validateData(br); this.chargeService.addCharge(chargeParam); return "success"; }
@RequiresPermissions(value = {"charge:list","charge:add"},logical = Logical.AND) @RequestMapping(value = "/remove", method = RequestMethod.POST) @ResponseBody public String removeCharge(Integer id) { return this.chargeService.removeCharge(id) ? "success" : "fail"; }
@RequiresRoles("0") @RequiresPermissions(value = {"charge:list","charge:add"},logical = Logical.AND) @RequestMapping(value = "/recover", method = RequestMethod.POST) @ResponseBody public String recoverCharge(Integer id) { return this.chargeService.recoverCharge(id) ? "success" : "fail"; }
@RequiresPermissions(value = {"charge:list","charge:add"},logical = Logical.AND) @RequestMapping(value = "/removes", method = RequestMethod.POST) @ResponseBody
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| UserFind u = (UserFind)SecurityUtils.getSubject().getPrincipal(); u.setUserPassword(encryptedData.getEncryptedPwd()); u.setSalt(encryptedData.getSalt()); return "success"; } model.addAttribute("msg","两次输入密码不一致"); }else { model.addAttribute("msg","新密码与原密码一致"); } } else { model.addAttribute("msg","原密码输入不正确"); } return "user/editPwd"; }
@RequiresRoles("0") @RequiresPermissions("user:list") @RequestMapping(value = "/remove",method = RequestMethod.POST) @ResponseBody public String removeUser(Integer id){ return this.userService.removeUser(id)?"success":"fail"; }
@RequiresRoles("0") @RequiresPermissions("user:list") @RequestMapping(value = "/recover",method = RequestMethod.POST) @ResponseBody public String recoverUser(Integer id){ return this.userService.recoverUser(id)?"success":"fail"; }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
@RequestMapping(value = "/login",method = RequestMethod.GET) public String toLogin(){ return "login"; }
@RequestMapping(value = "/register",method = RequestMethod.GET) public String toRegister(){ return "register"; }
@RequestMapping("/captcha") @SuppressWarnings("static-access") public void captcha(HttpServletResponse response, HttpSession session) { VerifyCode vc = new VerifyCode(); BufferedImage img = vc.getImage(); String text = vc.getText(); session.setAttribute("code", text); try { VerifyCode.output(img, response.getOutputStream()); } catch (IOException e) { e.printStackTrace(); } }
@RequestMapping(value = "/login",method = RequestMethod.POST) public String login(UserParam user, String captcha, HttpSession session, Model model){ Subject subject = SecurityUtils.getSubject();
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
@RequiresPermissions(value = {"menu:list","menu:add"},logical = Logical.AND) @RequestMapping(value = "/remove",method = RequestMethod.POST) @ResponseBody public String removeMenu(Integer id){ return this.menuService.removeMenu(id)?"success":"fail"; }
@RequiresPermissions(value = {"menu:list","menu:add"},logical = Logical.AND) @RequestMapping(value = "/recover",method = RequestMethod.POST) @ResponseBody public String recoverMenu(Integer id){ return this.menuService.recoverMenu(id)?"success":"fail"; }
@RequiresPermissions(value = {"menu:list","menu:add"},logical = Logical.AND) @RequestMapping(value = "/removes",method = RequestMethod.POST) @ResponseBody public String removeMenus(Integer[] ids){ return this.menuService.batchRemoveMenus(Arrays.asList(ids))?"success":"fail"; }
@RequiresPermissions(value = {"menu:list","menu:add"},logical = Logical.AND) @RequestMapping(value = "/recovers",method = RequestMethod.POST) @ResponseBody public String recoverMenus(Integer[] ids){ return this.menuService.batchRecoverMenus(Arrays.asList(ids))?"success":"fail"; }
}
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=101222062008200wj
https://javayms.pages.dev?id=101222062008200wj