——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Tomcat≥8
开发工具 eclipse/idea/myeclipse/sts等均可配置运行
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SSM+Maven毕业生去向登记分析管理系统(java+ssm+html+javascript+mysql)
项目介绍
本项目包含两种角色,管理员与学生角色; 管理员角色包含以下功能: 管理员登录,学生管理,留言管理,通知公告管理,查看专业比较,查看年份比较,查看去向明细,查看去向统计,修改密码等功能。
学生角色包含以下功能: 学生登录,查看通知公告,查看我的去向,留言管理,修改个人资料,修改密码等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本; 6.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目
技术栈
后端:Spring SpringMVC MyBatis 2. 前端:HTML+css+javascript
使用说明
使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中db.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入http://localhost:8080/ssm_bysqxdj 登录
——————————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 @RequestMapping("/list2") public R list2 (@RequestParam Map<String, Object> params) { Query query = new Query(params); List<ReplyEntity> replyList = replyService.queryList(query); return R.ok().put("list" , replyList); } @RequestMapping("/info/{id}") public R info (@PathVariable("id") Long id) { ReplyEntity reply = replyService.queryObject(id); return R.ok().put("reply" , reply); } @RequestMapping("/save") public R save (@RequestBody ReplyEntity reply) { reply.setUser(super .getUserId()); replyService.save(reply); return R.ok(); } @RequestMapping("/update") public R update (@RequestBody ReplyEntity reply) { reply.setRtime(new Date()); replyService.update(reply); return R.ok(); }
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 public R update (@RequestBody SysRoleEntity role) { ValidatorUtils.validateEntity(role); role.setCreateUserId(getUserId()); sysRoleService.update(role); return R.ok(); } @SysLog("删除角色") @RequestMapping("/delete") @RequiresPermissions("sys:role:delete") public R delete (@RequestBody Long[] roleIds) { sysRoleService.deleteBatch(roleIds); return R.ok(); } } package com.learn.utils;public class MultipartFileUtil { public static final Logger logger = LoggerFactory.getLogger(MultipartFileUtil.class);
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 return R.ok(); } } package com.learn.aop;@Aspect @Component public class SysLogAspect { @Autowired private SysLogService sysLogService; @Pointcut("@annotation(com.learn.annotation.SysLog)") public void logPointCut () { } @Before("logPointCut()") public void saveSysLog (JoinPoint joinPoint) { MethodSignature signature = (MethodSignature) joinPoint.getSignature(); Method method = signature.getMethod(); SysLogEntity sysLog = new SysLogEntity(); SysLog syslog = method.getAnnotation(SysLog.class);
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 @Controller @RequestMapping("/sys/generator") public class SysGeneratorController { @Autowired private SysGeneratorService sysGeneratorService; @ResponseBody @RequestMapping("/list") @RequiresPermissions("sys:generator:list") public R list (@RequestParam Map<String, Object> params) { Query query = new Query(params); List<Map<String, Object>> list = sysGeneratorService.queryList(query); int total = sysGeneratorService.queryTotal(query); PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
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 SysMenuEntity root = new SysMenuEntity(); root.setMenuId(0L ); root.setName("一级菜单" ); root.setParentId(-1L ); root.setOpen(true ); menuList.add(root); return R.ok().put("menuList" , menuList); } @RequestMapping("/perms") @RequiresPermissions("sys:menu:perms") public R perms () { List<SysMenuEntity> menuList = null ; if (getUserId() == Constant.SUPER_ADMIN){ menuList = sysMenuService.queryList(new HashMap<String, Object>()); }else { menuList = sysMenuService.queryUserList(getUserId()); } return R.ok().put("menuList" , menuList); } @RequestMapping("/info/{menuId}") @RequiresPermissions("sys:menu:info") public R info (@PathVariable("menuId") Long menuId) { SysMenuEntity menu = sysMenuService.queryObject(menuId); return R.ok().put("menu" , menu); }
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 public class IPUtils { private static Logger logger = LoggerFactory.getLogger(IPUtils.class); public static String getIpAddr (HttpServletRequest request) { String ip = null ; try { ip = request.getHeader("x-forwarded-for" ); if (StringUtils.isEmpty(ip) || "unknown" .equalsIgnoreCase(ip)) { ip = request.getHeader("Proxy-Client-IP" ); } if (StringUtils.isEmpty(ip) || ip.length() == 0 || "unknown" .equalsIgnoreCase(ip)) { ip = request.getHeader("WL-Proxy-Client-IP" ); } if (StringUtils.isEmpty(ip) || "unknown" .equalsIgnoreCase(ip)) { ip = request.getHeader("HTTP_CLIENT_IP" ); } if (StringUtils.isEmpty(ip) || "unknown" .equalsIgnoreCase(ip)) { ip = request.getHeader("HTTP_X_FORWARDED_FOR" ); } if (StringUtils.isEmpty(ip) || "unknown" .equalsIgnoreCase(ip)) {
——————————PayStart——————————
项目链接: https://javayms.github.io?id=261122532008200qn https://javayms.pages.dev?id=261122532008200qn