From a3326f650760da906271054fd102c62b2f4c83ee Mon Sep 17 00:00:00 2001 From: QuanNg Date: Thu, 18 Apr 2024 13:29:49 +0700 Subject: [PATCH] Check try_catch, logger, redirect Rare_fault khi catch exception. Sua footer --- .../admin/AdminCourseController.java | 110 ++++++++------ .../elearning/controller/api/ClassAPI.java | 46 +++--- .../elearning/controller/api/CourseAPI.java | 37 +++-- .../elearning/controller/api/PointAPI.java | 56 +++++--- .../elearning/controller/api/RegisterAPI.java | 6 +- .../elearning/controller/api/SemesterAPI.java | 13 +- .../elearning/controller/api/StudentAPI.java | 9 +- .../elearning/controller/api/TeacherAPI.java | 13 +- .../elearning/controller/api/UserAPI.java | 18 ++- .../controller/web/HomeController.java | 3 + .../controller/web/StudentController.java | 3 + .../templates/web/fragments/footer.html | 135 ++++++++++-------- .../templates/web/views/contact.html | 2 +- 13 files changed, 282 insertions(+), 169 deletions(-) diff --git a/src/main/java/com/hcmutap/elearning/controller/admin/AdminCourseController.java b/src/main/java/com/hcmutap/elearning/controller/admin/AdminCourseController.java index 8ab2f87..302972b 100644 --- a/src/main/java/com/hcmutap/elearning/controller/admin/AdminCourseController.java +++ b/src/main/java/com/hcmutap/elearning/controller/admin/AdminCourseController.java @@ -147,53 +147,64 @@ public String addCourse(@ModelAttribute("course") CourseModel courseModel, Model @GetMapping("/admin-management/add-class") public String addClass(ModelMap model) { - model.addAttribute("courses", courseService.findAll()); - model.addAttribute("semester", semesterService.findAll()); - if(!model.containsAttribute("class")) - model.addAttribute("class",new ClassResDTO()); - return "admin/views/createClass"; + try{ + model.addAttribute("courses", courseService.findAll()); + model.addAttribute("semester", semesterService.findAll()); + if(!model.containsAttribute("class")) + model.addAttribute("class",new ClassResDTO()); + return "admin/views/createClass"; + }catch (Exception e){ + logger.error(String.valueOf(new RuntimeException(e))); + return "redirect:/login/Rare_fault"; + } } @PostMapping("/admin-management/add-class") public String addClass(@ModelAttribute("class") ClassResDTO classRes, ModelMap model) { - ClassModel classModel = new ClassModel(); - classModel.setCourseId(classRes.getCourseId()); - classModel.setClassName(classRes.getClassName()); - classModel.setClassId(classModel.getCourseId()+"-"+classModel.getClassName()+"-"+classRes.getSemesterId()); - classModel.setDayOfWeek(classRes.getDayOfWeek()); - classModel.setTimeStart(classRes.getTimeStart()); - classModel.setTimeEnd(convertTime(classRes.getTimeStart(), classRes.getTimeStudy())); - classModel.setRoom(classRes.getRoom()); - classModel.setSemesterId(classRes.getSemesterId()); + try { + ClassModel classModel = new ClassModel(); + classModel.setCourseId(classRes.getCourseId()); + classModel.setClassName(classRes.getClassName()); + classModel.setClassId(classModel.getCourseId() + "-" + classModel.getClassName() + "-" + classRes.getSemesterId()); + classModel.setDayOfWeek(classRes.getDayOfWeek()); + classModel.setTimeStart(classRes.getTimeStart()); + classModel.setTimeEnd(convertTime(classRes.getTimeStart(), classRes.getTimeStudy())); + classModel.setRoom(classRes.getRoom()); + classModel.setSemesterId(classRes.getSemesterId()); - boolean notSave = false; - List listClass = classService.findAll(); - for(ClassModel cls : listClass) { - if(cls.getClassId().equals(classModel.getClassId())) { - model.addAttribute("message", "Lớp " + classModel.getClassName() - +" của khóa học " + classModel.getCourseId() + " đã tồn tại!"); - notSave = true; - model.addAttribute("class",classRes); - model.addAttribute("error","error"); - break; - } else if(cls.getSemesterId().equals(classModel.getSemesterId()) && conflictTime(cls, classModel)) { - model.addAttribute("message", "Trùng lịch với lớp " + cls.getClassName() - +" của khóa học " + cls.getCourseId() + " (" + cls.getTimeStart() + "-" + cls.getTimeEnd() - + " " + cls.getDayOfWeek() + " " + cls.getRoom() + ")"); - notSave = true; - model.addAttribute("class",classRes); - model.addAttribute("error","error"); - break; + boolean notSave = false; + List listClass = classService.findAll(); + for (ClassModel cls : listClass) { + if (cls.getClassId().equals(classModel.getClassId())) { + model.addAttribute("message", "Lớp " + classModel.getClassName() + + " của khóa học " + classModel.getCourseId() + " đã tồn tại!"); + notSave = true; + model.addAttribute("class", classRes); + model.addAttribute("error", "error"); + break; + } else if (cls.getSemesterId().equals(classModel.getSemesterId()) && conflictTime(cls, classModel)) { + model.addAttribute("message", "Trùng lịch với lớp " + cls.getClassName() + + " của khóa học " + cls.getCourseId() + " (" + cls.getTimeStart() + "-" + cls.getTimeEnd() + + " " + cls.getDayOfWeek() + " " + cls.getRoom() + ")"); + notSave = true; + model.addAttribute("class", classRes); + model.addAttribute("error", "error"); + break; + } } + if (!notSave) { + model.addAttribute("message", "Lớp học đã được tạo thành công!"); + classService.save(classModel); + model.addAttribute("class", new ClassResDTO()); + } + model.addAttribute("courses", courseService.findAll()); + model.addAttribute("semester", semesterService.findAll()); + return "admin/views/createClass"; } - if(!notSave) { - model.addAttribute("message", "Lớp học đã được tạo thành công!"); - classService.save(classModel); - model.addAttribute("class",new ClassResDTO()); + catch (Exception e){ + logger.error(String.valueOf(new RuntimeException(e))); + return "redirect:/login/Rare_fault"; } - model.addAttribute("courses", courseService.findAll()); - model.addAttribute("semester", semesterService.findAll()); - return "admin/views/createClass"; } @GetMapping("/admin-management/update-class") @@ -352,14 +363,19 @@ int convertTime2(String timeStart, String timeEnd) { @GetMapping("/admin-management-semester") public String viewSemester (ModelMap model) { - List semesterList = semesterService.findAll(); - semesterList = sortSemester(semesterList); - model.addAttribute("semesters", semesterList); - LocalDate currentDate = LocalDate.now(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - String date = currentDate.format(formatter); - model.addAttribute("currentDate", date); - return "admin/views/viewSemester"; + try{ + List semesterList = semesterService.findAll(); + semesterList = sortSemester(semesterList); + model.addAttribute("semesters", semesterList); + LocalDate currentDate = LocalDate.now(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + String date = currentDate.format(formatter); + model.addAttribute("currentDate", date); + return "admin/views/viewSemester"; + }catch (Exception e){ + logger.error(String.valueOf(new RuntimeException(e))); + return "redirect:/login/Rare_fault"; + } } @GetMapping("/admin-management/add-semester") diff --git a/src/main/java/com/hcmutap/elearning/controller/api/ClassAPI.java b/src/main/java/com/hcmutap/elearning/controller/api/ClassAPI.java index 681dfb0..0e01b15 100644 --- a/src/main/java/com/hcmutap/elearning/controller/api/ClassAPI.java +++ b/src/main/java/com/hcmutap/elearning/controller/api/ClassAPI.java @@ -1,9 +1,12 @@ package com.hcmutap.elearning.controller.api; +import com.hcmutap.elearning.controller.admin.HomeController; import com.hcmutap.elearning.exception.NotFoundException; import com.hcmutap.elearning.model.ClassModel; import com.hcmutap.elearning.service.IClassService; import jakarta.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -11,37 +14,44 @@ @RestController @RequestMapping("/api") public class ClassAPI { - @Resource - private IClassService classService; - @GetMapping("/class/findAll") - public List findAll() { - return classService.findAll(); - } - @GetMapping("/class/findById") - public ClassModel findById(@RequestParam String id) { + private static final Logger logger = LoggerFactory.getLogger(ClassAPI.class); + @Resource + private IClassService classService; + @GetMapping("/class/findAll") + public List findAll() { + return classService.findAll(); + } + @GetMapping("/class/findById") + public ClassModel findById(@RequestParam String id) { try { return classService.findById(id); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + return null; } } - @PostMapping("/class") - public String save(@RequestBody ClassModel classModel) { return classService.save(classModel);} - @PutMapping("/class") - public void update(@RequestBody ClassModel classModel) { - // need to handler not found exception in dao -> service -> controller + @PostMapping("/class") + public String save(@RequestBody ClassModel classModel) { return classService.save(classModel);} + @PutMapping("/class") + public void update(@RequestBody ClassModel classModel) { + // need to handler not found exception in dao -> service -> controller try { classService.update(classModel); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); +// return null; } } - @DeleteMapping("/class") - public void delete(@RequestBody List ids) { + @DeleteMapping("/class") + public void delete(@RequestBody List ids) { try { classService.delete(ids); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); +// return null; } } } diff --git a/src/main/java/com/hcmutap/elearning/controller/api/CourseAPI.java b/src/main/java/com/hcmutap/elearning/controller/api/CourseAPI.java index 2bb01ee..994b20d 100644 --- a/src/main/java/com/hcmutap/elearning/controller/api/CourseAPI.java +++ b/src/main/java/com/hcmutap/elearning/controller/api/CourseAPI.java @@ -8,6 +8,8 @@ import jakarta.annotation.Resource; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -17,6 +19,7 @@ @RestController @RequestMapping("/api") public class CourseAPI { + private static final Logger logger = LoggerFactory.getLogger(CourseAPI.class); @Resource private ICourseService courseService; @GetMapping("/courses/findAll") @@ -25,12 +28,14 @@ public List findAll() { } @GetMapping("/courses/findById") public CourseModel findById(@RequestParam String id) { - try { - return courseService.findById(id); - } catch (NotFoundException e) { - throw new RuntimeException(e); - } - } + try { + return courseService.findById(id); + } catch (NotFoundException e) { +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + return null; + } + } @PostMapping("/courses") public String save(@RequestBody CourseModel courseModel) { return courseService.save(courseModel); @@ -38,14 +43,20 @@ public String save(@RequestBody CourseModel courseModel) { @PutMapping("/courses") public void update(@RequestBody CourseModel courseModel) { // need to handler not found exception in dao -> service -> controller - try { - courseService.update(courseModel); - } catch (NotFoundException e) { - throw new RuntimeException(e); - } - } + try { + courseService.update(courseModel); + } catch (NotFoundException e) { +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + } + } @DeleteMapping("/courses") public void delete(@RequestBody List ids) { - ids.forEach(id -> courseService.delete(id)); + try { + ids.forEach(id -> courseService.delete(id)); + } catch (Exception e) { +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + } } } diff --git a/src/main/java/com/hcmutap/elearning/controller/api/PointAPI.java b/src/main/java/com/hcmutap/elearning/controller/api/PointAPI.java index 5fc4a07..f3294a2 100644 --- a/src/main/java/com/hcmutap/elearning/controller/api/PointAPI.java +++ b/src/main/java/com/hcmutap/elearning/controller/api/PointAPI.java @@ -4,6 +4,8 @@ import com.hcmutap.elearning.model.PointModel; import com.hcmutap.elearning.service.IPointService; import jakarta.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -11,38 +13,54 @@ @RestController @RequestMapping("/api") public class PointAPI { - @Resource - private IPointService pointService; - @GetMapping("/points/findAll") - public List findAll() { - return pointService.findAll(); - } - @GetMapping("/points/findById") - public PointModel findById(@RequestParam String id) { + private static final Logger logger = LoggerFactory.getLogger(PointAPI.class); + @Resource + private IPointService pointService; + @GetMapping("/points/findAll") + public List findAll() { + try{ + return pointService.findAll(); + }catch (Exception e) { +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + return null; + } + } + @GetMapping("/points/findById") + public PointModel findById(@RequestParam String id) { try { return pointService.findById(id); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + return null; + } + } + @PostMapping("/points") + public void save(@RequestBody PointModel pointModel) { + try{ + pointService.save(pointModel); + }catch (Exception e) { +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } } - @PostMapping("/points") - public void save(@RequestBody PointModel pointModel) { - pointService.save(pointModel); - } - @PutMapping("/points") - public void update(@RequestBody PointModel pointModel) { + @PutMapping("/points") + public void update(@RequestBody PointModel pointModel) { try { pointService.update(pointModel); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } } - @DeleteMapping("/points") - public void delete(@RequestBody List ids) { + @DeleteMapping("/points") + public void delete(@RequestBody List ids) { try { pointService.delete(ids); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } } } diff --git a/src/main/java/com/hcmutap/elearning/controller/api/RegisterAPI.java b/src/main/java/com/hcmutap/elearning/controller/api/RegisterAPI.java index 526b976..9f373f5 100644 --- a/src/main/java/com/hcmutap/elearning/controller/api/RegisterAPI.java +++ b/src/main/java/com/hcmutap/elearning/controller/api/RegisterAPI.java @@ -4,6 +4,8 @@ import com.hcmutap.elearning.service.IRegisterService; import jakarta.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; @@ -11,6 +13,7 @@ @RestController @RequestMapping("/api") public class RegisterAPI { + private static final Logger logger = LoggerFactory.getLogger(RegisterAPI.class); @Resource private IRegisterService registerService; @PostMapping("/register") @@ -18,7 +21,8 @@ public void register(@RequestBody ModelMap model) { try { registerService.register(model); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } } diff --git a/src/main/java/com/hcmutap/elearning/controller/api/SemesterAPI.java b/src/main/java/com/hcmutap/elearning/controller/api/SemesterAPI.java index 2e7eb85..9428c5c 100644 --- a/src/main/java/com/hcmutap/elearning/controller/api/SemesterAPI.java +++ b/src/main/java/com/hcmutap/elearning/controller/api/SemesterAPI.java @@ -1,7 +1,11 @@ package com.hcmutap.elearning.controller.api; +import com.hcmutap.elearning.exception.NotFoundException; import com.hcmutap.elearning.model.SemesterModel; import com.hcmutap.elearning.service.impl.SemesterService; +import jakarta.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -9,6 +13,7 @@ @RestController public class SemesterAPI { + private static final Logger logger = LoggerFactory.getLogger(SemesterAPI.class); private final SemesterService semesterService; @Autowired public SemesterAPI(SemesterService semesterService) { @@ -17,6 +22,12 @@ public SemesterAPI(SemesterService semesterService) { @PostMapping("/api/semester") public String addSemester(@RequestBody SemesterModel semesterModel) { - return semesterService.save(semesterModel); + try{ + return semesterService.save(semesterModel); + }catch (Exception e) { +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + return null; + } } } diff --git a/src/main/java/com/hcmutap/elearning/controller/api/StudentAPI.java b/src/main/java/com/hcmutap/elearning/controller/api/StudentAPI.java index e149dd8..25b0280 100644 --- a/src/main/java/com/hcmutap/elearning/controller/api/StudentAPI.java +++ b/src/main/java/com/hcmutap/elearning/controller/api/StudentAPI.java @@ -6,6 +6,8 @@ import com.hcmutap.elearning.service.IStudentService; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -15,6 +17,7 @@ @RestController @RequestMapping("/api") public class StudentAPI { + private static final Logger logger = LoggerFactory.getLogger(StudentAPI.class); @Autowired private IStudentService studentService; @PostMapping("/student") @@ -26,7 +29,8 @@ public void update(@RequestBody StudentModel studentModel) { try { studentService.update(studentModel); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } } @DeleteMapping("/student") @@ -34,7 +38,8 @@ public void delete(@RequestBody List ids) { try { studentService.delete(ids); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } } diff --git a/src/main/java/com/hcmutap/elearning/controller/api/TeacherAPI.java b/src/main/java/com/hcmutap/elearning/controller/api/TeacherAPI.java index 6b29ce0..7b3aec8 100644 --- a/src/main/java/com/hcmutap/elearning/controller/api/TeacherAPI.java +++ b/src/main/java/com/hcmutap/elearning/controller/api/TeacherAPI.java @@ -5,6 +5,8 @@ import com.hcmutap.elearning.model.TeacherModel; import com.hcmutap.elearning.service.ITeacherService; import jakarta.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -12,6 +14,7 @@ @RestController @RequestMapping("/api") public class TeacherAPI { + private static final Logger logger = LoggerFactory.getLogger(TeacherAPI.class); @Resource(name="teacherService") private ITeacherService teacherService; @GetMapping("/teacher/findAll") @@ -23,7 +26,9 @@ public TeacherModel findById(@RequestParam String id) { try { return teacherService.findById(id); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + return null; } } @PostMapping("/teacher") @@ -35,7 +40,8 @@ public void update(@RequestBody TeacherModel teacherModel) { try { teacherService.update(teacherModel); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } } @DeleteMapping("/teacher") @@ -43,7 +49,8 @@ public void delete(@RequestBody List ids) { try { teacherService.delete(ids); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } } } diff --git a/src/main/java/com/hcmutap/elearning/controller/api/UserAPI.java b/src/main/java/com/hcmutap/elearning/controller/api/UserAPI.java index 358c05a..b1c84f9 100644 --- a/src/main/java/com/hcmutap/elearning/controller/api/UserAPI.java +++ b/src/main/java/com/hcmutap/elearning/controller/api/UserAPI.java @@ -9,6 +9,8 @@ import jakarta.annotation.Resource; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; import java.io.IOException; @@ -16,11 +18,19 @@ @RestController @RequestMapping("/api") public class UserAPI { + private static final Logger logger = LoggerFactory.getLogger(UserAPI.class); @Resource private IUserService userService; @PostMapping("/user") public String save(@RequestBody UserModel userModel) { - return userService.save(userModel); + try{ + return userService.save(userModel); + }catch (Exception e) { +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); + return null; + } + } @PutMapping("/user") public void update(HttpServletRequest request, HttpServletResponse response) throws IOException { @@ -31,7 +41,8 @@ public void update(HttpServletRequest request, HttpServletResponse response) thr try { userService.update(userModel); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } mapper.writeValue(response.getOutputStream(), userModel); } @@ -44,7 +55,8 @@ public void delete(HttpServletRequest request, HttpServletResponse response) thr try { userService.delete(userModel.getFirebaseId()); } catch (NotFoundException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + logger.error(String.valueOf(new RuntimeException(e))); } mapper.writeValue(response.getOutputStream(), "{}"); } diff --git a/src/main/java/com/hcmutap/elearning/controller/web/HomeController.java b/src/main/java/com/hcmutap/elearning/controller/web/HomeController.java index f4375c0..04a2343 100644 --- a/src/main/java/com/hcmutap/elearning/controller/web/HomeController.java +++ b/src/main/java/com/hcmutap/elearning/controller/web/HomeController.java @@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.InputStreamResource; import org.springframework.http.ResponseEntity; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; @@ -29,6 +31,7 @@ @Controller(value = "homeControllerOfWeb") public class HomeController { + private static final Logger logger = LoggerFactory.getLogger(HomeController.class); @Resource private IStudentService studentService; @Resource diff --git a/src/main/java/com/hcmutap/elearning/controller/web/StudentController.java b/src/main/java/com/hcmutap/elearning/controller/web/StudentController.java index 09a7d10..63d3b0d 100644 --- a/src/main/java/com/hcmutap/elearning/controller/web/StudentController.java +++ b/src/main/java/com/hcmutap/elearning/controller/web/StudentController.java @@ -8,6 +8,8 @@ import com.hcmutap.elearning.service.*; import com.hcmutap.elearning.service.impl.Class_CourseService; import com.hcmutap.elearning.service.impl.UserService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import jakarta.annotation.Resource; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; @@ -22,6 +24,7 @@ @Controller @RequestMapping(value = "/student") public class StudentController{ + private static final Logger logger = LoggerFactory.getLogger(StudentController.class); @Resource private UserService userService; @Resource diff --git a/src/main/resources/templates/web/fragments/footer.html b/src/main/resources/templates/web/fragments/footer.html index e2184b6..1adf3fe 100644 --- a/src/main/resources/templates/web/fragments/footer.html +++ b/src/main/resources/templates/web/fragments/footer.html @@ -2,71 +2,84 @@ + + + - -
- -
- - - - -
-
- -
- - -
-
- About us -
-
- Contact -
-
- + +
+ +
+ + + + +
+
+ +
+ + +
+
+
+ About us +
+
+
+
+ Contact +
+
+
+ - - - - - - - -
- - - + + + + + + + +
+ + + -
+
- -
-
-
-

- © 2024 Copyright -

-
-
-
- -
- + +
+
+
+

+ © 2024 Copyright +

+
+
+
+ +
+ - - - - - - - - - - - - -
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/web/views/contact.html b/src/main/resources/templates/web/views/contact.html index 568a805..f658d98 100644 --- a/src/main/resources/templates/web/views/contact.html +++ b/src/main/resources/templates/web/views/contact.html @@ -3,7 +3,7 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{web/layout/web-layout.html}"> - About Us + Contact