• 大小: 14.95MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-30
  • 语言: 其他
  • 标签:

资源简介

使用SSM、maven和bootstrap开发的一款教务管理系统,页面nice,代码ok,包含数据库文件。挺不错的值8分

资源截图

代码片段和文件信息

package com.system.controller;

import com.system.exception.CustomException;
import com.system.po.*;
import com.system.service.*;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by Jacey on 2017/6/30.
 */
@Controller
@RequestMapping(“/admin“)
public class AdminController {

    @Resource(name = “studentServiceImpl“)
    private StudentService studentService;

    @Resource(name = “teacherServiceImpl“)
    private TeacherService teacherService;

    @Resource(name = “courseServiceImpl“)
    private CourseService courseService;

    @Resource(name = “collegeServiceImpl“)
    private CollegeService collegeService;

    @Resource(name = “userloginServiceImpl“)
    private UserloginService userloginService;

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<学生操作>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/

    //  学生信息显示
    @RequestMapping(“/showStudent“)
    public String showStudent(Model model Integer page) throws Exception {

        List list = null;
        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(studentService.getCountStudent());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = studentService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = studentService.findByPaging(page);
        }

        model.addAttribute(“studentList“ list);
        model.addAttribute(“pagingVO“ pagingVO);

        return “admin/showStudent“;

    }

    //  添加学生信息页面显示
    @RequestMapping(value = “/addStudent“ method = {RequestMethod.GET})
    public String addStudentUI(Model model) throws Exception {

        List list = collegeService.finAll();

        model.addAttribute(“collegeList“ list);

        return “admin/addStudent“;
    }

     // 添加学生信息操作
    @RequestMapping(value = “/addStudent“ method = {RequestMethod.POST})
    public String addStudent(StudentCustom studentCustom Model model) throws Exception {

        Boolean result = studentService.save(studentCustom);

        if (!result) {
            model.addAttribute(“message“ “学号重复“);
            return “error“;
        }
        //添加成功后,也添加到登录表
        Userlogin userlogin = new Userlogin();
        userlogin.setUsername(studentCustom.getUserid().toString());
        userlogin.setPassword(“123“);
        userlogin.setRole(2);
        userloginService.save(userlogin);

        //重定向
        return “redirect:/admin/showStudent“;
    }

    // 修改学生信息页面显示
    @RequestMapping(value = “/editStudent“ method = {RequestMethod.GET})
    public String editStudentUI(Integer id Model model) throws Exception {
        if (id == null) {
 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-03-22 14:55  EducationManagement\
     目录           0  2018-03-22 14:55  EducationManagement\Examination_System\
     文件         787  2018-03-12 11:06  EducationManagement\Examination_System\.classpath
     目录           0  2018-03-22 14:55  EducationManagement\Examination_System\.idea\
     目录           0  2018-03-22 14:55  EducationManagement\Examination_System\.idea\artifacts\
     文件         320  2018-03-22 14:13  EducationManagement\Examination_System\.idea\artifacts\Examination_System_war.xml
     文件        3886  2018-03-22 14:13  EducationManagement\Examination_System\.idea\artifacts\Examination_System_war_exploded.xml
     文件         648  2018-03-22 14:13  EducationManagement\Examination_System\.idea\compiler.xml
     目录           0  2018-03-22 14:56  EducationManagement\Examination_System\.idea\inspectionProfiles\
     目录           0  2018-03-22 14:55  EducationManagement\Examination_System\.idea\libraries\
     文件         514  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml
     文件         522  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__com_fasterxml_classmate_1_3_1.xml
     文件         493  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__com_mchange_c3p0_0_9_5_2.xml
     文件         598  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__com_mchange_mchange_commons_java_0_2_11.xml
     文件         594  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__commons_beanutils_commons_beanutils_1_8_3.xml
     文件         558  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__commons_logging_commons_logging_1_2.xml
     文件         578  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__javax_servlet_javax_servlet_api_3_1_0.xml
     文件         473  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__javax_servlet_jstl_1_2.xml
     文件         611  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__javax_validation_validation_api_1_1_0_Final.xml
     文件         455  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__junit_junit_4_12.xml
     文件         469  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__log4j_log4j_1_2_17.xml
     文件         574  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__mysql_mysql_connector_java_5_1_41.xml
     文件         541  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_apache_shiro_shiro_core_1_2_3.xml
     文件         555  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_apache_shiro_shiro_spring_1_2_3.xml
     文件         534  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_apache_shiro_shiro_web_1_2_3.xml
     文件         549  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_aspectj_aspectjweaver_1_8_10.xml
     文件         532  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_hamcrest_hamcrest_core_1_3.xml
     文件         634  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_hibernate_hibernate_validator_5_4_1_Final.xml
     文件         608  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_jboss_logging_jboss_logging_3_3_0_Final.xml
     文件         585  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_jetbrains_annotations_java5_16_0_1.xml
     文件         645  2018-03-22 14:13  EducationManagement\Examination_System\.idea\libraries\Maven__org_mybatis_generator_mybatis_generator_core_1_3_5.xml
............此处省略500个文件信息

评论

共有 条评论

相关资源