|  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  | import javax.jws.soap.SOAPBinding; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | import javax.servlet.http.HttpSession; | 
|---|
|  |  |  | import java.awt.image.BufferedImage; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    // todo 短信验证码 | 
|---|
|  |  |  | //    @ResponseBody | 
|---|
|  |  |  | //    @PostMapping("/getSMSCode") | 
|---|
|  |  |  | //    public String getSMSCode( String phone) { | 
|---|
|  |  |  | 
|---|
|  |  |  | if (password.equals("38B8/EBdihRzcFNtJYSH+g==")){ | 
|---|
|  |  |  | return "/password.html"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //验证验证码是否正确 | 
|---|
|  |  |  | String kaptcha = super.getPara("kaptcha").trim(); | 
|---|
|  |  |  | String code = (String) super.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); | 
|---|
|  |  |  | if (ToolUtil.isEmpty(kaptcha) || !kaptcha.equalsIgnoreCase(code)) { | 
|---|
|  |  |  | throw new InvalidKaptchaException(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | User user = userService.getByAccount(username); | 
|---|
|  |  |  | password = AESUtils.decrypt(password); | 
|---|
|  |  |  | String s = MD5.md5(password); | 
|---|
|  |  |  | 
|---|
|  |  |  | model.addAttribute("tips", "该账号不存在"); | 
|---|
|  |  |  | return "/login.html"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | GetTokenRequest tokenRequest = new GetTokenRequest(); | 
|---|
|  |  |  | tokenRequest.setUsername(username); | 
|---|