oneYuan 发表于 2017-3-21 16:07:36

Controller只能访问Get方法吗?怎么访问不了Post方法?

@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方法该怎么做

admin 发表于 2017-3-21 18:00:23

jeecg 用的是springmvc,百度springmvc用法
页: [1]
查看完整版本: Controller只能访问Get方法吗?怎么访问不了Post方法?