Kindergarten Management System – Overview, Tech Stack, Deployment Guide, and Backend Controller Code
The article presents a kindergarten management system featuring three user roles, outlines its Spring Boot and Thymeleaf technology stack, details required runtime and database environments, provides step‑by‑step deployment instructions, and includes complete backend controller source code for user, teacher, student, and school management functionalities.
Project Introduction
Kindergarten Management System divided into three roles: Administrator, Parent, Teacher.
Administrator functions: System management: user management, page management, role management Campus management: teacher management, salary management, material management, menu management, class management Class management: student management, announcement management, course management Attendance management: teacher attendance, student attendance, teacher attendance statistics, student attendance statistics, sign‑in/sign‑out
Technology Stack
Spring Boot
HTML + Thymeleaf
Environment Requirements
Runtime: Java JDK 1.8 (other versions are theoretically possible)
IDE: IDEA, Eclipse, MyEclipse (IDEA recommended)
Tomcat: 7.x, 8.x, 9.x
Hardware: Windows 7/8/10 with >1 GB RAM or macOS
Maven project: presence of pom.xml indicates a Maven project
Database: MySQL 8.0
Usage Instructions
Use Navicat or another tool to create a database with the same name in MySQL and import the project's SQL file.
Modify the database configuration in the project's .yml file to match your environment.
Import the project into IDEA/Eclipse/MyEclipse; if it is a Maven project, select Maven during import and after a successful import run mvn clean and mvn install .
Run the project and open http://localhost:8081 to log in.
Administrator account: admin / password 123456
Teacher account: wangjianlin / password 123456
Code
User Management Controller
@Controller
@RequestMapping("admin/system/user")
public class UserController {
@Autowired
UserService userService;
@Autowired
RoleService roleService;
@Autowired
UploadService uploadService;
@RequestMapping("list")
@SysLog("跳转系统用户列表页面")
public String list(){
return "admin/user/list";
}
@RequiresPermissions("sys:user:list")
@PostMapping("list")
@ResponseBody
public PageData
list(@RequestParam(value = "page",defaultValue = "1") Integer page,
@RequestParam(value = "limit",defaultValue = "10") Integer limit,
ServletRequest request){
Map map = WebUtils.getParametersStartingWith(request, "s_");
PageData
userPageData = new PageData<>();
QueryWrapper
userWrapper = new QueryWrapper<>();
if(!map.isEmpty()){
String type = (String) map.get("type");
if(StringUtils.isNotBlank(type)) {
userWrapper.eq("is_admin", "admin".equals(type) ? true : false);
}
String keys = (String) map.get("key");
if(StringUtils.isNotBlank(keys)) {
userWrapper.and(wrapper -> wrapper.like("login_name", keys).or().like("tel", keys).or().like("email", keys));
}
}
IPage
userPage = userService.page(new Page<>(page,limit),userWrapper);
userPageData.setCount(userPage.getTotal());
userPageData.setData(userPage.getRecords());
return userPageData;
}
@RequestMapping("add")
public String add(ModelMap modelMap){
List
roleList = roleService.selectAll();
modelMap.put("roleList",roleList);
return "admin/user/add";
}
@RequiresPermissions("sys:user:add")
@PostMapping("add")
@ResponseBody
@SysLog("保存新增系统用户数据")
public ResponseEntity add(@RequestBody User user){
if(StringUtils.isBlank(user.getLoginName())){
return ResponseEntity.failure("登录名不能为空");
}
if(user.getRoleLists() == null || user.getRoleLists().size() == 0){
return ResponseEntity.failure("用户角色至少选择一个");
}
if(userService.userCount(user.getLoginName())>0){
return ResponseEntity.failure("登录名称已经存在");
}
//设置默认密码
if(StringUtils.isBlank(user.getPassword())){
user.setPassword(Constants.DEFAULT_PASSWORD);
}
userService.saveUser(user);
if(StringUtils.isBlank(user.getId())){
return ResponseEntity.failure("保存用户信息出错");
}
//保存用户角色关系
userService.saveUserRoles(user.getId(),user.getRoleLists());
return ResponseEntity.success("操作成功");
}
// ... (other methods omitted for brevity) ...
}Teacher Management Controller
@Controller
public class TeacherController {
@Autowired
private TeacherService lxxTeacherService;
@Autowired
private StudentService lxxStudentService;
@Autowired
private DeleteService deleteService;
// 跳转教师查询页面
@RequestMapping("/selectTeacher")
public String selectTeacher(){
return "view/teacher/selTeacher";
}
// 查询教师信息
@RequestMapping("selTeacher")
@ResponseBody
public LayuiResult
selTeacher(TeacherDB teacherDB, pageCount pageCount){
LayuiResult
result = new LayuiResult<>();
List
list = lxxTeacherService.selTeacher(teacherDB,pageCount);
int count = lxxTeacherService.selTeacherCount(teacherDB);
result.setData(list);
result.setCount(count);
return result;
}
// 根据教师编号查询教师信息
@RequestMapping("/selTeacherId")
public String selTeacherId(Integer id, Model model){
List
tea = lxxTeacherService.selTeacherId(id);
List
selpol = lxxStudentService.selPolitics();
model.addAttribute("tea",tea);
model.addAttribute("selpol",selpol);
return "view/teacher/updTeacher";
}
// ... (other methods omitted for brevity) ...
}Student Management Controller
@Controller
public class StudentController extends BaseController {
@Autowired
private StudentService studentService;
// 跳转学生查询页面
@RequestMapping("/selectStudent")
public String selectStudent(){
return "view/student/selStudent";
}
// 查询所有学生
@RequestMapping("selStudent")
@ResponseBody
public LayuiResult
selectStu(pageCount pageCount, StudentVO studentVO){
LayuiResult
result = new LayuiResult<>();
List
list = studentService.selStudent(studentVO,pageCount);
int count = studentService.selCount(studentVO);
result.setData(list);
result.setCount(count);
return result;
}
// 查询所有专业
@RequestMapping("selDepartment")
@ResponseBody
public LayuiResult
selDepartment(){
List
selDepartment = studentService.selDepartment();
LayuiResult result = new LayuiResult();
result.setData(selDepartment);
return result;
}
// ... (other methods omitted for brevity) ...
}School Management Controller
@Controller
@RequestMapping("schoolmanage")
public class SchoolManageController extends BaseController {
@Autowired
private SchoolManageService schoolManageService;
/**
* 进入班级管理页面
*/
@RequestMapping("classmanage")
public String classmanage() {
return "view/schoolmanage/classmanage";
}
/**
* 进入年级管理页面
*/
@RequestMapping("grademanage")
public String grademanage() {
return "view/schoolmanage/grademanage";
}
// ... (other methods omitted for brevity) ...
}Java Captain
Focused on Java technologies: SSM, the Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading; occasionally covers DevOps tools like Jenkins, Nexus, Docker, ELK; shares practical tech insights and is dedicated to full‑stack Java development.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.