Here is the controller method which i'm trying to redirect from:
@GetMapping("/opensignup/{id}")
public String openSignUp(@PathVariable(value = "id") Long Id) {
Tournament comp = tournamentRepository.findOne(Id);
boolean b = true;
comp.setSignUpOpen(b);
return "redirect:/comp/" + Id;
}
I have another method (which is a post, if thats relevant) which successfully redirects to the correct page/controller with the same line:
return "redirect:/comp/" + Id;
Instead of redirecting, it simply prints that link on the browser. (It prints it with the correct id.) Like this:
redirect:/comp/5
How do I get it to redirect instead of print?