How to send the redirect from Spring controller if the return type is not String for the URL Handkler method.
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ResponseBody
public JsonResponse save(@RequestBody FormBean formBean) {
if(condition true)
? Save(formBean)
: "redirect:/anotherUrl";
}
So JsonResponse which is a return type is actually a java class, how do i send redirect here ?