Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RequestMapping("/test")
- pubilc void test(@RequestBody MyPram myParam){
- ...
- }
- RequestContext ctx = RequestContext.getCurrentContext();
- HttpServletRequest request = ctx.getRequest();
- if (request.getMethod().equalsIgnoreCase("POST")) {
- return "POST MEhod";
- } else if (request.getMethod().equalsIgnoreCase("GET")) {
- return "GET Method";
- }
- }
Add Comment
Please, Sign In to add comment