基于javaweb的SSM+Maven毕业设计管理系统(java+ssm+jsp+jquery+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

490023162402

500023162402

520023162402

530023162402

540023162402

550023162402

基于javaweb的SSM+Maven毕业设计管理系统(java+ssm+jsp+jquery+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.数据库:5.7/8.0版本均可; 6.是否Maven项目:是;

技术栈

  1. 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+jQuery

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录

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
            Writer w = new OutputStreamWriter(new FileOutputStream(f), "utf-8");  
t.process(dataMap, w);
w.close();
} catch (Exception ex) {
ex.printStackTrace();
throw new RuntimeException(ex);
}
return f;
}
}
package cn.lynu.controller;


@Controller
@RequestMapping("/projectController")
public class ProjectController {

@Autowired
private ProjectService projectService;
@Autowired
private TeacherService teacherService;
@Autowired
private StudentService studentService;

@ResponseBody
@RequestMapping(value="/getProjectListByTeacherId",method=RequestMethod.GET)
public PageInfo<Project> getProjectListByTeacherId(@RequestParam(required=true)String teacherId,
@RequestParam(defaultValue="1")int pageNum,@RequestParam(defaultValue="8")int pageSize) {
PageHelper.startPage(pageNum, pageSize);
List<Project> list = projectService.getProjectListByTeacherId(teacherId);
return new PageInfo<>(list);
}

@ResponseBody
@RequestMapping(value="/getCountProjectNum",method=RequestMethod.GET)
public int getCountProjectNum() {
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

@Controller
@RequestMapping("/downController")
public class DownController {

@Autowired
private DownService downService;

@ResponseBody
@RequestMapping(value="/getSubDown",method=RequestMethod.GET)
public PageInfo getSubDown(@RequestParam(defaultValue="1")int pageNum,
@RequestParam(defaultValue="6")int pageSize,@RequestParam(defaultValue="1")int navigatePages) {
PageHelper.startPage(pageNum, pageSize);
List<Down> list = downService.getAllDown();
return new PageInfo<>(list, navigatePages);
}

@RequestMapping("/downloadResource")
public @ResponseBody String downloadResource(HttpSession session,HttpServletResponse response,
HttpServletRequest request,@RequestParam(required=true)String fileName) throws Exception {
if(fileName==null||fileName=="") {
return null;
}
String dataDir=request.getServletContext().getRealPath("/WEB-INF/file");
Path path=Paths.get(dataDir, fileName);
if(Files.exists(path)) {
response.setContentType("application/octet-stream");
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
      	try {
HttpSession session = request.getSession();
User user = (User) session.getAttribute("user");
if(user!=null) {
Student student = studentService.getStudentByUserId(userId);
Lunwen lw=new Lunwen();
lw.setLunwenDate(new Date());
lw.setLunwenName(filename);
lw.setLunwenPath(basePath+"/"+filename);
lunwenService.insertOrUpdate(student.getStudentId(),lw);
}else {
return false;
}
//相同文件会覆盖
lunwen.transferTo(lunewenFile);
return true;
} catch (Exception e) {
e.printStackTrace();
}
}
return false;
}

@RequestMapping("/downloadResource")
public @ResponseBody void downloadResource(HttpServletResponse response,
HttpServletRequest request,String studentId) throws Exception {
if(studentId==null||studentId.isEmpty()) {
return;
}
Lunwen lunwen = lunwenService.getLunwenBySid(studentId);
if(lunwen==null) {
return;
}
String dataDir=lunwen.getLunwenPath();
String fileName=lunwen.getLunwenName();
Path path=Paths.get(dataDir);
if(Files.exists(path)) {
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment;filename="+Utils.filenameEncoding(fileName, request));
try {
Files.copy(path, response.getOutputStream());
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
        			lw.setLunwenDate(new Date());
lw.setLunwenName(filename);
lw.setLunwenPath(basePath+"/"+filename);
lunwenService.insertOrUpdate(student.getStudentId(),lw);
}else {
return false;
}
//相同文件会覆盖
lunwen.transferTo(lunewenFile);
return true;
} catch (Exception e) {
e.printStackTrace();
}
}
return false;
}

@RequestMapping("/downloadResource")
public @ResponseBody void downloadResource(HttpServletResponse response,
HttpServletRequest request,String studentId) throws Exception {
if(studentId==null||studentId.isEmpty()) {
return;
}
Lunwen lunwen = lunwenService.getLunwenBySid(studentId);
if(lunwen==null) {
return;
}
String dataDir=lunwen.getLunwenPath();
String fileName=lunwen.getLunwenName();
Path path=Paths.get(dataDir);
if(Files.exists(path)) {
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment;filename="+Utils.filenameEncoding(fileName, request));
try {
Files.copy(path, response.getOutputStream());
} catch (IOException e) {
e.printStackTrace();
}
}
return;
}

}
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

@Controller
@RequestMapping("/ktbgController")
public class KtbgController {

@Autowired
private KtbgService ktbgService;

@ResponseBody
@RequestMapping(value="/insertSelective",method=RequestMethod.POST)
public boolean insertSelective(Ktbg ktbg) {
if(ktbg.getKtbgId()==null) {
return ktbgService.insertSelective(ktbg);
}else {
return ktbgService.updateColumn(ktbg);
}
}

@ResponseBody
@RequestMapping("/getKtbgByStudentId")
public Ktbg getKtbgByStudentId(String studentId,HttpServletResponse response) {
response.setContentType("application/json;charset=utf-8");
Ktbg ktbg = ktbgService.getKtbgByStudentId(studentId);
if(ktbg!=null) {
return ktbg;
}
return new Ktbg();
}

@ResponseBody
@RequestMapping(value="/updateColumn",method=RequestMethod.PUT)
public boolean updateColumn(Ktbg ktbg) {
return ktbgService.updateColumn(ktbg);
}

@RequestMapping("/gotoTktbg")
public String gotoTktbg(@RequestParam(required=true)String studentId) {
return "redirect:http://localhost:8080/graduation/teacher/tktbg.html?studentId="+studentId;
}

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
	}

@ResponseBody
@RequestMapping("/thisTeacherisLeader")
public YansouTeacher thisTeacherisLeader(HttpSession session){
User user = (User) session.getAttribute("user");
if(user!=null) {
return teacherService.thisTeacherisLeader(user);
}
return null;
}

@ResponseBody
@RequestMapping("/getYansouTeamStu")
public PageInfo<Student> getYansouTeamStu(HttpSession session,
@RequestParam(defaultValue="1")int pageNum, @RequestParam(defaultValue="8")int pageSize){
User user = (User) session.getAttribute("user");
if(user!=null) {
Teacher teacher = teacherService.findTeacherByUserId(user.getUserId());
if(teacher!=null) {
PageHelper.startPage(pageNum, pageSize);
List<Student> list = teacherService.getYansouTeamStu(teacher.getTeacherId());
return new PageInfo<Student>(list);
}
}
return null;
}

}
package cn.lynu.controller;



@Controller
@RequestMapping("/userController")


项目链接:
https://javayms.github.io?id=362322092805200mn
https://javayms.pages.dev?id=362322092805200mn