Just making a guess of the common problem check if it helps:
If you have a controller as given below, all requests other than /book/edit
will be directed to mydefault()
while /book/edit
will be sent to meet().
@Controller
@RequestMapping("/book")
public class BookController {
@RequestMapping
public @ResponseBody String mydefault() {
return "Hi Book!";
}
@RequestMapping("/edit")
public @ResponseBody String meet() {
return "Nice to meet you Book!";
}
}
It is a common problem where you have two methods without explicit path mapping.