A GET 405 error occurred in the $.ajax request

A page written by bootstrap:
clipboard.png

:

clipboard.png

:

clipboard.png

this is the background code:

@PostMapping(value = "forgetPassword", produces = "application/json;charset=utf-8")
    @ResponseBody
    public String forgetPassword(@RequestParam("email") String email) {
            return null;
    }

this is an error report in the background:

 [http-nio-8090-exec-8] org.springframework.web.servlet.PageNotFound.
handleHttpRequestMethodNotSupported Request method "GET" not supported

excuse me, why is this? I clearly requested user/forgetPassword, but the error message pointed to login.html (the interface for entering the mailbox is a pop-up of a tag on login.html)


it seems that the input mailbox itself should be a form submit click and then submit the form directly without executing the click event you bound
and then the form should be submitted by GET. The background does not support the GET method to request this page, so report an error
if this is the case, block the submission of the form before you verify it

Menu