It seems like Spring isn\'t routing/authorizing HTTP POST requests correctly. When I send a HTTP POST request I always get \"405 Method Not Allowed\" response and this in the lo
I had a similar problem. The problem was in controller, which handled error pages and supported only GET method. When I changed it to both GET and POST it started work.
Example:
@Controller
public class ErrorController {
@RequestMapping(value = "/error" method = {RequestMethod.GET, RequestMethod.POST})
public String error(@RequestParam(value = "err", required = false) Integer paramErrorCode, Locale locale,
ModelMap model, HttpServletRequest httpRequest) {
// Do something
}
See details https://stackoverflow.com/a/57571936/1839027