springboot 接收post和get请求

接收post请求:

@RequestMapping(value = "/api/v1/create_info", method = RequestMethod.POST)
    public String handlePostRequest(@RequestParam("sysname") String sysname,
                             @RequestParam("timestamp") String timestamp,
                             @RequestParam("data") String data,
                             @RequestParam("token") String token)

post和get都可以:

@RequestMapping("/landing")
    public String landingHandler(@RequestParam String param1,
                                 @RequestParam String param2,
                                 @RequestParam String param3,
                                 @RequestParam String param4,
                                 Model model,
                                 HttpServletRequest request)
    {

 

posted @ 2018-09-11 11:18  无天666  阅读(43845)  评论(0编辑  收藏  举报