从错误信息可以看出:
-
UserController有一个save方法,访问路径为
http://localhost/save
-
BookController也有一个save方法,访问路径为
http://localhost/save
-
当访问
http://localhost/saved
的时候,到底是访问UserController还是BookController?
@Controller
@RequestMapping("/book")
public class BookController {
@RequestMapping("/save")
@ResponseBody
public String save(){
System.out.println("book save ...");
return "{'module':'book save'}";
}
}
改成这样就好
标签:插件,http,BookController,端口,访问,book,80,save,localhost From: https://www.cnblogs.com/4444Murphy/p/17379454.html