SpringMVC——问题汇总

1.html页面ajax请求/login。后台报:

Request method 'GET' not supported

原因:

后台请求使用了method = POST,但是url请求没有formdata,该情况下浏览器会默认是用GET请求

解决方式:

  • 修改后台请求方式为Get
  • 或者在ajax请求url时添加data
原文地址:https://www.cnblogs.com/zyxiaohuihui/p/8482703.html