|
@Controller
@RequestMapping("api")
public class ApIController extends BaseController {@RequestMapping(params = "hello", method = RequestMethod.POST)
public void hello(HttpServletRequest request, HttpServletResponse response){
System.out.println("post");
}
@RequestMapping(method = RequestMethod.GET)
public void list(HttpServletRequest request, HttpServletResponse response){
System.out.println("get");
在浏览器中访问project/api.do?hello,控制台输出的都是“get”,我想能够访问hello方法该怎么做
|
|