Is it possible to put @CookieValue in a parameter object? I can't seem to get this to work whats is missing?
@RequestMapping(value = "/Users", method = RequestMethod.GET)
@ResponseBody
public Response getAllActiveUsers(CookieParameters parameterObject) {
return getUserImpl.getAllActiveUsers(parameterObject.userToken,
parameterObject.loggedInUserId);
}
Here is the parameter object class.
public class CookieParameters {
public String userToken;
public String loggedInUserId;
public CookieParameter(
@CookieValue(value = "Token", defaultValue = "") final String userToken,
@CookieValue(value = "LoggedInUserId", defaultValue = "") final String loggedInUserId) {
this.userToken = userToken;
this.loggedInUserId = loggedInUserId;
}