在发布新课程的时候, 页面跳转失败, 提示全局错误

后端控制台提示如下:

org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

vue 报错

Uncaught (in promise) error

后来发现js中格式不对

如图:

org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

 

 更改后的代码

如图:

org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

 

 页面跳转成功

org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

 

 数据库添加成功

org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

 

相关文章:

  • 2021-08-26
  • 2021-12-12
  • 2021-12-25
  • 2022-01-01
  • 2022-12-23
猜你喜欢
  • 2021-08-30
  • 2021-04-16
  • 2022-01-29
  • 2021-09-11
相关资源
相似解决方案