错误如下:

Failed to load resource: the serverFailed to responded with a status of 415 (Unsupported Media Type)

 

正确的交互方式:

页面:

前台传数据到后台时,后台使用@RequestBody将数据转换成对象时报错

js:  注意引入js包jquery.serializejson.min.js 

注意method 为post,contenttype 为application/json

前台传数据到后台时,后台使用@RequestBody将数据转换成对象时报错

xml文件配置:

前台传数据到后台时,后台使用@RequestBody将数据转换成对象时报错

后台:

前台传数据到后台时,后台使用@RequestBody将数据转换成对象时报错

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-07-05
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2021-08-06
  • 2022-01-18
  • 2022-12-23
  • 2022-03-09
相关资源
相似解决方案