zoukankan      html  css  js  c++  java
  • @RequestParam和@RequestBody的区别-------springMVC

    https://blog.csdn.net/qq_27093465/article/details/50519444

    @RequestParam

    1,用来处理Content-Type: 为 application/x-www-form-urlencoded编码的内容。(默认类型

    2,post和get请求都行

    @RequestBody

    1,request header Content-Type的值来判断: ,application/json, application/xml等。这些格式的数据,必须使用@RequestBody来处理

    2, multipart/form-data, 不能处理(次类型多用来上传文件类型---即使用@RequestBody不能处理这种格式的数据,@RequestParam这个却是可以处理的。)

    3,只能post请求

    4,可以穿插着@RequestParam使用url上面的参数

  • 相关阅读:
    Reverse Linked List
    Sqrt(x)
    Convert Sorted Array to Binary Search Tree
    Remove Linked List Elements
    Happy Number
    Length of Last Word
    Pow(x, n)
    Rotate Image
    Permutations
    Integer to Roman
  • 原文地址:https://www.cnblogs.com/vhyc/p/8983357.html
Copyright © 2011-2022 走看看