In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "how to write the code of the train ticket booking system in Java". The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to write the code of the train ticket booking system in Java" can help you solve your doubts.
I. Project operation
Environment configuration:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe (both supported by IntelliJ IDEA,Eclispe,MyEclispe,Sts)
Project technology:
JSP + Servlert + html+ css + JavaScript + JQuery + Ajax etc.
Second, the effect picture
Core Code personal Center Controller/** * personal Center Controller * / @ Controllerpublic class UserInforController {@ Autowired private UserInforServiceImpl userInforService = null / * change password operation * @ param oldPassword * @ param newPassword * @ param rePassword * @ param httpSession * @ return * / @ RequestMapping ("changePassword.do") @ ResponseBody public Map changePassword (String oldPassword, String newPassword, String rePassword, HttpSession httpSession) {HashMap map = new HashMap () If (newPassword.equals (rePassword)) {SystemManager admin = (SystemManager) httpSession.getAttribute ("admin"); String encodeByMD5 = MD5Utils.encodeByMD5 (oldPassword); if (encodeByMD5.equals (admin.getSmPassword () {String newPasswords = MD5Utils.encodeByMD5 (newPassword); admin.setSmPassword (newPasswords); userInforService.updateSystemManagePassword (admin.getSmId (), admin) Map.put ("type", "success"); map.put ("msg", "password modified successfully"); return map;} else {map.put ("type", "error"); map.put ("msg", "original password error"); return map }} else {map.put ("type", "error"); map.put ("msg", "password inconsistency"); return map }} / * employees change their personal password * @ param oldPassword * @ param newPassword * @ param rePassword * @ param httpSession * @ return * / @ RequestMapping ("changeEmployeePassword.do") @ ResponseBody public Map changeEmployeePassword (String oldPassword, String newPassword, String rePassword) HttpSession httpSession) {HashMap map = new HashMap () If (newPassword.equals (rePassword)) {Integer eid = (Integer) httpSession.getAttribute ("employeeId"); try {userInforService.updateEmployeePassword (eid, oldPassword, newPassword); map.put ("type", "success"); map.put ("msg", "password changed successfully"); return map } catch (CustomException e) {map.put ("type", "error"); map.put ("msg", "original password error"); return map;}} else {map.put ("type", "error"); map.put ("msg", "password inconsistency") Return map;}} / * View personal information * @ param httpSession * @ return * / @ RequestMapping ("inforEmployee.do") public @ ResponseBody EmployeeCustomVo getInforEmployee (HttpSession httpSession) {Integer id = (Integer) httpSession.getAttribute ("employeeId"); EmployeeCustomVo employeeCustomVo = userInforService.getInforEmployee (id); return employeeCustomVo } / * modify personal information * @ param httpSession * @ param employee * @ return * / @ ResponseBody @ RequestMapping ("updateInforEmployee.do") public Message updateInforEmployee (HttpSession httpSession, Employee employee) {Integer id = (Integer) httpSession.getAttribute ("employeeId"); employee.seteId (id); if (userInforService.updateEmploueeById (id,employee)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.