/*    */ package com.picc.grab.controller.login;
/*    */ 
/*    */ import com.alibaba.fastjson.JSONObject;
/*    */ import java.io.IOException;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ import org.springframework.web.bind.annotation.ResponseBody;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Controller
/*    */ public class StartCaptchaServlet
/*    */ {
/*    */   @RequestMapping({"/verCodeImg"})
/*    */   @ResponseBody
/*    */   public JSONObject getVerCode(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
/* 25 */     GeetestLib gtSdk = new GeetestLib(GeetestConfig.getCaptcha_id(), GeetestConfig.getPrivate_key());
/*    */     
/* 27 */     String resStr = "{}";
/*    */ 
/*    */     
/* 30 */     String userid = "test";
/*    */ 
/*    */     
/* 33 */     int gtServerStatus = gtSdk.preProcess(userid);
/*    */ 
/*    */     
/* 36 */     request.getSession().setAttribute(gtSdk.gtServerStatusSessionKey, Integer.valueOf(gtServerStatus));
/*    */     
/* 38 */     request.getSession().setAttribute("userid", userid);
/*    */     
/* 40 */     resStr = gtSdk.getResponseStr();
/*    */ 
/*    */     
/* 43 */     return JSONObject.parseObject(resStr);
/*    */   }
/*    */ }


/* Location:              C:\Users\Administrator\Desktop\ROOT\WEB-INF\classes\!\com\picc\grab\controller\login\StartCaptchaServlet.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */