@RequestMapping("getClassTree")
    @ResponseBody
    public Object getClassTree() {
        List<Object> colleges = new ArrayList<>();

        COLLEGE:
        for (College college : collegeService.getAll()) {
            Map<String, Object> c = new HashMap<>();
            c.put("collegeId", college.getId());
            c.put("text", college.getCollegeName());
            c.put("expanded", true);

            List<Object> specialties = new ArrayList<>();

            SPECIALTY:
            for (Specialty specialty : college.getSpecialtyList()) {
                Map<String, Object> s = new HashMap<>();
                s.put("specialtyId", specialty.getId());
                s.put("text", specialty.getSpecialtyName());
                s.put("expanded", true);

                List<Object> grades = new ArrayList<>();

                GRADE:
                for (Grade grade : specialty.getGradeList()) {
                    Map<String, Object> g = new HashMap<>();
                    g.put("gradeId", grade.getId());
                    g.put("text", grade.getGradeName());
                    g.put("expanded", true);

                    List<Object> classes = new ArrayList<>();

                    CLASS:
                    for (Class clazz : grade.getClassList()) {
                        Map<String, Object> z = new HashMap<>();
                        z.put("classId", clazz.getId());
                        z.put("text", clazz.getClassName());
                        z.put("leaf", true);

                        classes.add(z);
                    }

                    if (classes.isEmpty()) {
                        continue GRADE;
                    }
                    g.put("children", classes);
                    grades.add(g);

                }

                if (grades.isEmpty()) {
                    continue SPECIALTY;
                }
                s.put("children", grades);
                specialties.add(s);

            }

            if (specialties.isEmpty()) {
                continue COLLEGE;
            }
            c.put("children", specialties);
            colleges.add(c);

        }

        return colleges;
    }