基于javaweb+mysql的jsp+servlet幼儿园管理系统(java+jsp+easyui+h-ui+servlet+mysql)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的JSP+Servlet幼儿园管理系统(java+jsp+easyui+h-ui+servlet+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项目: 否;
技术栈
- 后端:Servlet 2. 前端:JSP+CSS+Javascript+jQuery+easyui+h-ui
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中util/DbUtil.java配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入http://localhost:8080/ 登录
} catch (Exception e) {
return "ERR";
/**
* Method name: addStu <BR>
* Description: 教师添加 <BR>
* @param user
* @return String<BR>
*/
@ResponseBody
@RequestMapping("/addQianTui")
public String addQianTui(Sign sign) {
Subject subject = SecurityUtils.getSubject();
zc.add(tongJi.getZhengChang());
tq.add(tongJi.getTiQian());
cd.add(tongJi.getChiDao());
model.addAttribute("names", names);
model.addAttribute("zc", zc);
model.addAttribute("tq", tq);
model.addAttribute("cd", cd);
return "ls/tongJiXueSheng";
@RequestMapping(value = "/course")
public String course(Model model) {
return "ls/course";
//课程
@ResponseBody
public String updatePassword(String password) {
return userService.updatePassword(password);
教师管理控制层:
@Controller
@RequestMapping(value = "/ls")
public class TeacherController {
@Autowired
private StudentService studentService;
@Autowired
private ClassService classService;
* @param user
* @return String<BR>
*/
@ResponseBody
@RequestMapping("/addNotice")
public String addNotice(Notice notice) {
try {
notice.setCreatTime(new Date());
noticeService.addNotice(notice);
return "SUCCESS";
} catch (Exception e) {
return "ERR";
/**
* Method name: updateStudent <BR>
@RequestMapping("/user")
public class UserController {
private final Logger logger = LoggerFactory.getLogger(UserController.class);
private final ResultMap resultMap;
@Autowired
private UserService userService;
@Autowired
private UserRoleService userRoleService;
@Autowired
public UserController(ResultMap resultMap) {
this.resultMap = resultMap;
@RequestMapping(value = "/getMessage", method = RequestMethod.GET)
*/
@RequestMapping(value = "/user/checkUserPassword")
@ResponseBody
public boolean checkUserPassword(String password) {
return userService.checkUserPassword(password);
/**
* Method name: updatePassword <BR>
* Description: 更新密码 <BR>
* @param password 旧密码
* @return String 是否成功<BR>
*/
public ResultMap login(String username, String password) {
return userService.login(username, password);
/**
* Method name: login <BR>
* Description: 登录页面 <BR>
* @return String login.html<BR>
*/
@RequestMapping(value = "/index")
public String login() {
return "login";
/**
* Method name: index <BR>
*/
@RequestMapping(value = "/lskq")
public String lskq() {
return "ls/sign";
/**
* Method name: getAllSignByLimit <BR>
* Description: 根据条件获取所有教师 <BR>
* @param userParameter
* @return Object<BR>
*/
@RequestMapping("/getAllSignByLimit")
names.add(tongJi.getUserName());
zc.add(tongJi.getZhengChang());
tq.add(tongJi.getTiQian());
cd.add(tongJi.getChiDao());
model.addAttribute("names", names);
model.addAttribute("zc", zc);
model.addAttribute("tq", tq);
model.addAttribute("cd", cd);
return "ls/tongJi";
//所有学生签到的总次数统计
@RequestMapping(value = "/tongJiXueSheng")
public String tongJiXueSheng(Model model) {
public String updateNotice(Notice notice) {
return noticeService.updateStu(notice);
/**
* Method name: delClaTea <BR>
* Description: 批量删除教师<BR>
* @param ids
* @return String<BR>
*/
@RequestMapping(value = "delNotice")
@ResponseBody
@Transactional
public String delNotice(String[] ids) {
@ResponseBody
public Object getAllNoticeByLimit(Notice noticeParameter) {
return noticeService.getAllNoticeByLimit(noticeParameter);
/**
* Method name: addStuPage <BR>
* Description: 增加教师界面 <BR>
* @return String<BR>
*/
@RequestMapping(value = "/addNoticePage")
public String addNoticePage(Integer id, Model model) {
model.addAttribute("manageNotice", id);
if (null != id) {
return signService.getAllChildSignByLimit(signParameter);
//所有老师签到的总次数统计
@RequestMapping(value = "/kqtj")
public String kqtj(Model model) {
List<TongJi> ts = signService.getAllTeacherCount();
List<String> names = new ArrayList<>();
List<Integer> zc = new ArrayList<>();
List<Integer> tq = new ArrayList<>();
List<Integer> cd = new ArrayList<>();
for (TongJi tongJi : ts) {
names.add(tongJi.getUserName());
/**
* Method name: addStu <BR>
* Description: 教师添加 <BR>
* @param user
* @return String<BR>
*/
@ResponseBody
@RequestMapping("/addSign")
public String addSign(Sign sign) {
Subject subject = SecurityUtils.getSubject();
User user = (User) subject.getPrincipal();
try {
Date date=new Date();
*/
@RequestMapping(value = "/logout", method = RequestMethod.GET)
public String logout() {
Subject subject = SecurityUtils.getSubject();
User user = (User) subject.getPrincipal();
if (null != user) {
logger.info("{}---退出登录!", user.getUserName());
subject.logout();
return "login";
/**
* Method name: login <BR>
* Description: 登录验证 <BR>
* Remark: <BR>
* @param username 用户名
@RequestMapping(value = "/")
public String index(Model model) {
Subject subject = SecurityUtils.getSubject();
User user = (User) subject.getPrincipal();
if (null != user) {
model.addAttribute("user", user);
List<Page> pageList = pageService.getAllRolePageByUserId(user.getUserId());
model.addAttribute("pageList", pageList);
return "index";
} else {
return "login";
* Description: 根据条件获取所有教师 <BR>
* @param userParameter
* @return Object<BR>
*/
@RequestMapping("/getAllNoticeByLimit")
@ResponseBody
public Object getAllNoticeByLimit(Notice noticeParameter) {
return noticeService.getAllNoticeByLimit(noticeParameter);
/**
* Method name: addStuPage <BR>
* Description: 增加教师界面 <BR>
* @return String<BR>
this.resultMap = resultMap;
@RequestMapping(value = "/getMessage", method = RequestMethod.GET)
public ResultMap getMessage() {
return resultMap.success().message("您拥有用户权限,可以获得该接口的信息!");
@RequestMapping(value = "/editUserPage")
public String editUserPage(String userId, Model model) {
model.addAttribute("manageUser", userId);
if (null != userId) {
User user = userService.selectByPrimaryKey(userId);
model.addAttribute("manageUser", user);
return "user/userEdit";
@ResponseBody
@RequestMapping(value = "/lskq")
public String lskq() {
return "ls/sign";
/**
* Method name: getAllSignByLimit <BR>
* Description: 根据条件获取所有教师 <BR>
* @param userParameter
* @return Object<BR>
*/
@RequestMapping("/getAllSignByLimit")
@ResponseBody
public Object getAllSignByLimit(Sign signParameter) {