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







1 2 3
| 管理员:后台管理 雇主:发布兼职任务、指派兼职人 兼职者:竞标接单
|
基于javaweb的SpringBoot兼职平台系统(java+springboot+ssm+html+thymeleaf+maven+ajax+mysql)
一、项目运行 环境配置:
Jdk1.8 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)
项目技术:
HTML +Springboot+ SpringMVC + MyBatis + ThymeLeaf + JavaScript + JQuery + Ajax + maven等等.
——————————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
| model.addAttribute("bookMarks", bookMarks);
return "employee/bookmarks"; }
@PostMapping("bookmarks/remove") @ResponseBody public String bookmarks(Long taskId, HttpSession session) { Employee employee = (Employee) session.getAttribute("employee");
employeeBookmarkedService.remove(employee.getId(), taskId);
return "删除收藏信息"; }
@GetMapping("/task/completed") public String completedTask(HttpSession session, Model model) { Employee employee = (Employee) session.getAttribute("employee");
List<TaskVo> taskVos = taskService.getCompletedByEmployeeId(employee.getId());
model.addAttribute("tasks", taskVos); return "employee/completed_task"; }
|
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
| public class EmployeeLoginInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { HttpSession session = request.getSession(); Employee employee = (Employee) session.getAttribute("employee"); if (employee == null) { if ("XMLHttpRequest".equalsIgnoreCase(request.getHeader("X-Requested-With"))) { response.sendError(401); }
else { response.sendRedirect("/login"); } return false; } return true; } } package com.yuu.recruit.controller;
@Controller @RequestMapping("admin/employee") public class AdminEmployeeController {
@Resource private EmployeeService employeeService;
|
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
| }
return "admin/task_category_form"; }
@PostMapping("save") public String save(TaskCategory taskCategory) { taskCategoryService.save(taskCategory); return "redirect:/admin/task/category"; }
@GetMapping("onPopular/{id}") public String onPopular(@PathVariable Long id) { taskCategoryService.onPopular(id); return "redirect:/admin/task/category"; }
@GetMapping("closePopular/{id}") public String closePopular(@PathVariable Long id) { taskCategoryService.closePopular(id); return "redirect:/admin/task/category"; }
|
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
|
@Controller @RequestMapping("admin/task/category") public class AdminTaskCategoryController {
@Resource private TaskCategoryService taskCategoryService;
@GetMapping("") public String taskCategory(Model model) { List<TaskCategoryVo> taskCategories = taskCategoryService.getAll();
model.addAttribute("taskCategories", taskCategories); return "admin/task_category"; }
@GetMapping("form") public String form(Long id, Model model) {
|
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
| List<TaskCategoryVo> taskCategoryVos = taskCategoryService.getAll();
Integer taskCount = taskService.getAllCount();
Integer employeeCount = employeeService.getAllCount();
Integer employerCount = employerService.getAllCount();
List<TaskCategoryVo> popularCategories = taskCategoryService.getPopular();
List<TaskVo> recentTaskVos = taskService.getRecently();
model.addAttribute("taskCategories", taskCategoryVos); model.addAttribute("taskCount", taskCount); model.addAttribute("employeeCount", employeeCount); model.addAttribute("employerCount", employerCount); model.addAttribute("popularCategories", popularCategories); model.addAttribute("recentTasks", recentTaskVos);
return "index"; }
@GetMapping("register") public String register() { return "register"; }
@PostMapping("register") public String register(Integer accountType, String username, String password, RedirectAttributes redirectAttributes) { if (accountType == 0) {
|
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
|
@GetMapping("") public String taskCategory(Model model) { List<Employee> employees = employeeService.getAll();
model.addAttribute("employees", employees); return "admin/employee"; } } package com.yuu.recruit.controller;
@Controller @RequestMapping("admin/employer") public class AdminEmployerController {
@Resource private EmployerService employerService;
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=531422302105200hc
https://javayms.pages.dev?id=531422302105200hc