LoginController extends BaseController { @RequestMapping(value = "/login/{p}", method = RequestMethod.POST) public String login(@PathVariable("p") String p, @RequestHeader(required = true, name = GlobalConstant.TIMESTAMP) String timestamp, @RequestHeader(required = true, name = GlobalConstant.APPKEY) String appkey, HttpServletResponse response) throws Exception { UserInfo userInfo = loginService.validateAndGetUserInfo(p, timestamp, appkey); UserInfo dataBaseUserInfo = userInfoService.getLoginUserInfo(userInfo); return loginService.getSuccessLoginResult(dataBaseUserInfo, appkey, response); }  @RequestMapping(value = "/login/{p}", method = RequestMethod.POST) String login(@PathVariable("p") String p, @RequestHeader(required = true, name = GlobalConstant.TIMESTAMP) String timestamp,
		@RequestHeader(required = true, name = GlobalConstant.APPKEY) String appkey, HttpServletResponse response);  }
@Test public void testLogin() throws Exception { String[] uriVariables = getLoginParam(); HttpHeaders headers = getHttpHeaders(); HttpEntity<String> entity = new HttpEntity<String>(headers); ResponseEntity<String> exchange = restTemplate.exchange(LOGIN_URL, HttpMethod.POST, entity, String.class, uriVariables); List<String> token = exchange.getHeaders().get(GlobalConstant.USER_TONKEN); log.info("============返回结果================"); if (!CollectionUtils.isEmpty(token)) { log.info("打印token=" + DesUtil.decrypt(token.get(0), APPKEY)); } List<String> userId = exchange.getHeaders().get(GlobalConstant.USE_ID); if (!CollectionUtils.isEmpty(token)) { log.info("打印userId=" + DesUtil.decrypt(userId.get(0), APPKEY)); } log.info("打印返登陆回结果" + exchange.getBody()); }