——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
分为前台和后台
前台校园门户网站信息查看:学生
后台内容管理:管理员、教师、社团(角色不同,权限菜单不同)

前台




后台







技术框架
JavaBean MVC JSP SSM(Spring SpringMVC MyBatis) MySQL jQuery JavaScript CSS…
基于javaweb的SSM校园社团门户网站管理系统(前台、后台)(java+jsp+ssm+mysql)
——————————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 49
| @Controller @RequestMapping("/schoolInfo") public class SchoolInfoController extends BaseController {
@Autowired private SchoolInfoService schoolInfoService; @Autowired private GzService gzService;
@RequestMapping(value = "/findByObj.do") public String findByObj(SchoolInfo schoolInfo, Model model, HttpServletRequest request, HttpServletResponse response) { Object attribute = request.getSession().getAttribute("isManage"); if(isEmpty(attribute)){ Integer id2 = Integer.valueOf(request.getSession().getAttribute("userId").toString()); schoolInfo.setAddUserId(id2); } Pager<SchoolInfo> pagers = schoolInfoService.findByEntity(schoolInfo); model.addAttribute("pagers", pagers); model.addAttribute("obj", schoolInfo); return "schoolInfo/schoolInfo"; }
@RequestMapping(value = "/findByMap.do") public String findByMap(SchoolInfo schoolInfo, Model model, HttpServletRequest request, HttpServletResponse response) { Map<String,Object> params = new HashMap<String,Object>(); if(!isEmpty(schoolInfo.getContent())){
|
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
| Map<String,Object> params = new HashMap<String,Object>(); if(!isEmpty(userRole.getUserId())){ params.put("userId", userRole.getUserId()); } if(!isEmpty(userRole.getRoleId())){ params.put("roleId", userRole.getRoleId()); } Pager<UserRole> pagers = userRoleService.findByMap(params); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", userRole); return jsonObject.toString(); }
@RequestMapping(value = "/exAdd.json", method = RequestMethod.POST) @ResponseBody public String exAddJson(UserRole userRole, Model model, HttpServletRequest request, HttpServletResponse response) { userRoleService.insert(userRole); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("message", "添加成功"); return jsonObject.toString(); }
@RequestMapping(value = "/exUpdate.json",method = RequestMethod.POST) @ResponseBody public String exUpdateJson(UserRole userRole, Model model, HttpServletRequest request, HttpServletResponse response) { userRoleService.update(userRole); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("message", "修改成功");
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| package com.demo.controller;
@Controller @RequestMapping("/userNotice") public class UserNoticeController extends BaseController {
@Autowired private UserNoticeService userNoticeService;
|
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
| * @return */ @RequestMapping(value = "/findByObj.json", method = RequestMethod.GET) @ResponseBody public String findByObjByEntity(UserRole userRole, Model model, HttpServletRequest request, HttpServletResponse response) { Pager<UserRole> pagers = userRoleService.findByEntity(userRole); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", userRole); return jsonObject.toString(); }
@RequestMapping(value = "/findByMap.json", method = RequestMethod.GET) @ResponseBody public String findByMapMap(UserRole userRole, Model model, HttpServletRequest request, HttpServletResponse response) { Map<String,Object> params = new HashMap<String,Object>(); if(!isEmpty(userRole.getUserId())){ params.put("userId", userRole.getUserId()); } if(!isEmpty(userRole.getRoleId())){ params.put("roleId", userRole.getRoleId()); } Pager<UserRole> pagers = userRoleService.findByMap(params); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", userRole); return jsonObject.toString(); }
@RequestMapping(value = "/exAdd.json", 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 43 44 45
| public String findByObjByEntity(SchoolInfo schoolInfo, Model model, HttpServletRequest request, HttpServletResponse response) { Pager<SchoolInfo> pagers = schoolInfoService.findByEntity(schoolInfo); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", schoolInfo); return jsonObject.toString(); }
@RequestMapping(value = "/findByMap.json", method = RequestMethod.GET) @ResponseBody public String findByMapMap(SchoolInfo schoolInfo, Model model, HttpServletRequest request, HttpServletResponse response) { Map<String,Object> params = new HashMap<String,Object>(); if(!isEmpty(schoolInfo.getContent())){ params.put("content", schoolInfo.getContent()); } if(!isEmpty(schoolInfo.getAddTime())){ params.put("addTime", schoolInfo.getAddTime()); } if(!isEmpty(schoolInfo.getAddUserId())){ params.put("addUserId", schoolInfo.getAddUserId()); } Pager<SchoolInfo> pagers = schoolInfoService.findByMap(params); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", schoolInfo); return jsonObject.toString(); }
|
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
| }
@RequestMapping(value = "/update.do") public String update(Integer id,Model model) { Gz obj = gzService.load(id); model.addAttribute("obj",obj); return "gz/update"; }
@RequestMapping(value = "/exUpdate.do") public String exUpdate(Gz gz, Model model, HttpServletRequest request, HttpServletResponse response) { gzService.update(gz); return "redirect:/gz/findByObj.do"; }
@RequestMapping(value = "/delete.do") public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { gzService.deleteById(id); return "redirect:/gz/findByObj.do"; }
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=071422560304103al
https://javayms.pages.dev?id=071422560304103al