一、项目运行
环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)
项目技术:
JSP + Servlert + html+ css + JavaScript + JQuery + Ajax 等等;
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
return "user/list";
}
}
个人中心Controller:
/**
* 个人中心Controller
*/
@Controller
public class UserInforController {
@Autowired
private UserInforServiceImpl userInforService = null;
/**
* 修改密码操作
Employee employee = loginService.findEmployeeById(id);
HashMap<String, String> map = new HashMap<String, String>();
map.put("account",employee.geteAccount());
map.put("name",employee.geteName());
return map;
}
@RequestMapping(value = "/logout.do")
public String logout(HttpSession httpSession){
httpSession.removeAttribute("employeeId");
return "redirect:/";
}
@RequestMapping(value = "/logoutAdmin.do")
public String logoutAdmin(HttpSession httpSession){
httpSession.removeAttribute("admin");
* @param newPassword
* @param rePassword
* @param httpSession
* @return
*/
@RequestMapping("changePassword.do")
@ResponseBody
public Map<String, String> changePassword(String oldPassword, String newPassword,
String rePassword, HttpSession httpSession){
HashMap<String, String> map = new HashMap<String, String>();
if (newPassword.equals(rePassword)){
SystemManager admin = (SystemManager) httpSession.getAttribute("admin");
String encodeByMD5 = MD5Utils.encodeByMD5(oldPassword);
if (encodeByMD5.equals(admin.getSmPassword())){