我正在尝试获取此页面添加到我的请求参数值
春季安全:
<security:http pattern="/users/reset*" security="none" />
形式:
<div class="input_form" style="margin:0 auto;width:500px;padding:14px;">
<sf:form action="${contextPath}users/resetpassword" method="POST">
<label>User Name</label> <input type="text" name="username">
<label>Email Address</label> <input type="text" name="email">
<button type="submit">Reset Password</button> <br/>
</sf:form>
</div>
@RequestMapping(value = "resetPassword", method = RequestMethod.POST)
public ModelAndView resetPassword(@RequestParam("email") String email,
@RequestParam("username") String username) {
logger.info("Enter email reset password");
logger.info("user name:" + username);
logger.info("email address:" + email);
return null;
}
现在,当我尝试提交表单时,我收到此警告 405 Request method 'Post' not supported on submit 错误:
WARN : org.springframework.web.servlet.PageNotFound - Request method 'POST' not supported