@RequestMapping(
     value = "getSettings",
     method = RequestMethod.GET,
     produces = "application/json;charset=UTF-8")
 public @ResponseBody Settings getSettings(
     HttpServletRequest httpRequest, HttpServletResponse response) {
   System.out.println("getSettings called");
   System.out.println(System.getProperty("user.dir"));
   CacheManager cm = new CacheManager();
   Settings ss2 = (Settings) cm.getItFromCache("Settings", "MySettings");
   if (ss2 == null) {
     ss2 = new Settings();
     ss2.setName("Raj Jeyarajan");
     ss2.setPhone("509-999-3434");
     ss2.setEmail("*****@*****.**");
   }
   return ss2;
 }
  @RequestMapping(
      value = "updateSettings",
      method = RequestMethod.POST,
      produces = "application/json;charset=UTF-8")
  public @ResponseBody ResponseWrapper updateSettings(
      HttpServletRequest httpRequest, HttpServletResponse response) {
    ResponseWrapper rw = new ResponseWrapper();
    System.out.println("Posting update settings");
    Settings ss2 = null;
    try {
      ss2 = JSONRequestMapper.getRequestObjectFromServletRequest(httpRequest, Settings.class);
      ss2.setName(ss2.getName() + "..");
      HashMap<String, String> errorsMap = (new ModelValidator()).validate(ss2);
      System.out.println("Validation Error.." + errorsMap);

      CacheManager cm = new CacheManager();
      cm.putItInCache("Settings", "MySettings", ss2);
      System.out.println("Account Holder Name:" + ss2.getName());
      System.out.println("Account Holder Email:" + ss2.getEmail());
      System.out.println("Account Holder Phone:" + ss2.getPhone());
      if (errorsMap.size() == 0) {
        rw.setSuccess(true);
      } else {
        rw.setSuccess(false);
      }
      rw.setValidationErrorMap(errorsMap);
      rw.setMyModel(ss2);
      // .response.setHeader("Access-Control-Allow-Origin", "*");

      // response.setHeader("Access-Control-Allow-Methods", "GET, POST, DELETE");
      emailService.sendEmail(
          "*****@*****.**", "*****@*****.**", "Settings updated", "Settings updated");
    } catch (Exception e) {
      e.printStackTrace();
    }
    return rw;
  }