Guest User

Untitled

a guest
Jan 23rd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. @RequestMapping("/test")
  2. pubilc void test(@RequestBody MyPram myParam){
  3. ...
  4. }
  5.  
  6. RequestContext ctx = RequestContext.getCurrentContext();
  7. HttpServletRequest request = ctx.getRequest();
  8.  
  9. if (request.getMethod().equalsIgnoreCase("POST")) {
  10. return "POST MEhod";
  11. } else if (request.getMethod().equalsIgnoreCase("GET")) {
  12. return "GET Method";
  13. }
  14. }
Add Comment
Please, Sign In to add comment