one , Project brief

function : houseparent , Top Administrator , Three identities of students , Including learning Student management , Dormitory administrator management , Attendance management , Dormitory building management , absence from duty Record management , Personal information modification and other functions .

two , Project operation

Environment configuration : Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ
IDEA,Eclispe,MyEclispe,Sts All support ).

Project technology : JSP + Entity+ Servlert + html+ css + JavaScript + JQuery + Ajax wait .

User login operation code :
User login operation : @Controller public class LoginController { @Autowired private
UserService userService; @Autowired private TeacherService teacherService;
@Autowired private StudentService studentService; // Jump to login page
@GetMapping("/login") public String login() { return "login"; } // Login operation
@PostMapping("/login") @ResponseBody public Map<String, Object> login(String
userName, String password, String captcha, String type, HttpSession session) {
// Judge user name , password , customer type , Is the verification code empty if (StringUtils.isEmpty(userName) ||
StringUtils.isEmpty(password) || StringUtils.isEmpty(captcha) ||
StringUtils.isEmpty(type)) { return
MapControl.getInstance().error(" User name or password cannot be empty ").getMap(); } // Get the verification code generated by the system String
_captcha = (String) session.getAttribute("captcha"); // First judge whether the verification code is correct if
(!(captcha.toLowerCase()).equals(_captcha.toLowerCase())) { // Verification code error return
MapControl.getInstance().error(" Verification code error ").getMap(); } // Judge user type if
("1".equals(type)) { // Administrator authentication login User user = userService.login(userName,
MD5Utils.getMD5(password)); // Encrypt the password , Because the encrypted password is stored in the database if (user != null) {
session.setAttribute("user", user); session.setAttribute("type", 1); return
MapControl.getInstance().success().add("data", user).getMap(); } else { return
MapControl.getInstance().error(" Wrong user name or password ").getMap(); } } if ("2".equals(type))
{ // Teacher authentication login Teacher teacher = teacherService.login(userName,
MD5Utils.getMD5(password)); if (teacher != null) { session.setAttribute("user",
teacher); session.setAttribute("type", "2"); return
MapControl.getInstance().success().add("data", teacher).getMap(); } else {
return MapControl.getInstance().error(" Wrong user name or password ").getMap(); } } if
("3".equals(type)) { // Student authentication login Student student = studentService.login(userName,
MD5Utils.getMD5(password)); if (student != null) { session.setAttribute("user",
student); session.setAttribute("type", "3"); return
MapControl.getInstance().success().add("data", student).getMap(); } else {
return MapControl.getInstance().error(" Wrong user name or password ").getMap(); } } return
MapControl.getInstance().getMap(); } }

User logout operation code :
User logout operation : @Controller public class LogoutController { // Exit operation
@RequestMapping("/logout") public String logout(HttpSession session) {
// Give Way session invalid session.invalidate(); // Redirect to login page return "redirect:login"; } }

Technology
©2019-2020 Toolsou All rights reserved,
Redis Underlying data structure A person who dissuades others from learning computer , Are not good people win10 System computer C Where's the disc ,c disc users where? (win10c Disk not found users) Freshman c Language student management system ( lower ) hospital WIFI Which family is strong ? utilize Python Script unlimited spoof girlfriend computer C language program design —— Student management system Byte runout - Test development practice - One side cool meridian python Run code at specified time 5 Best style Linux Server system recommendation Anti anxiety life after naked resignation , I believe everything will have the best arrangement