i need help with my Spring Restful Service Script. Iam trying to set Default Values in a Post Body and i need to know thats possible? or not?
Its about a login who needs default values.
It works with Get Function with the following Code:
@ResponseBody
@RequestMapping(value= {"login/"},
method = {RequestMethod.GET, RequestMethod.POST},
consumes = {MediaType.TEXT_PLAIN_VALUE },
produces = {MediaType.APPLICATION_JSON_VALUE}
public String login(@RequestParam(value= "user", defaultValue = "") String user,
@RequestParam(value ="password", defaultValue = "") String password)
{
System.out.println(user+"---"+password);
}
But the Data are very sensible so i need to post them.