java - Spring安全表单操作登录不起作用
问题描述
我正在尝试使用表单登录对 Spring Security 进行身份验证。
我正在使用自定义身份验证。当我的系统有 Java 1.8 时,它运行良好。最近我已经将 Java 1.8 升级到 1.10,然后不再提交表单。我得到以下错误。
This www.act.com page can’t be found
No webpage was found for the web address: www.act.com/appname/login
HTTP ERROR 404
下面是我的登录表格。
<form class="smart-form client-form" name ="login" id="login-form"
accept-charset="UTF-8" role="form" method="post">
<header> Log In </header>
<fieldset>
<section> <label class="label">User Name</label> <label
class="input"> <i class="icon-append fa fa-user"></i> <input
type="text" name="username" id="uname"/> <b
class="tooltip tooltip-top-right"><i
class="fa fa-user txt-color-teal"></i> Please enter username</b></label> </section>
<section> <label class="label">Password</label> <label
class="input"> <i class="icon-append fa fa-lock"></i> <input
type="password" name="password" id="pw" /> <b
class="tooltip tooltip-top-right"><i
class="fa fa-lock txt-color-teal"></i> Enter your password</b>
</label>
</section>
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</fieldset>
<footer>
<button type="submit" class="btn btn-primary btn-lg">Sign in</button>
我在 jquery 中提交表单时附加操作。
$('#login-form').attr('action',"login");
任何人都有建议。我们将不胜感激您的帮助。
解决方案
推荐阅读
- python - / context 处的 TypeError 必须是 dict 而不是 RequestContext
- javascript - 如何删除以前的记录,问题是当我从下拉列表中选择城市时,它将被连接起来?
- apache-pig - SUBSTRING 操作在 JOIN 操作中不起作用
- android - Android:EditText 形状
- reactjs - 如何在 react-highstock 中绘制折线图和柱形图?
- azure - 天蓝色负载均衡器,它如何知道负载均衡虚拟机中的应用程序是否关闭?
- reactjs - 在 ReactJS 中发出多个并行 axios 请求
- node.js - 如何通过 apache 连接节点服务器?
- install4j - install4j Windows Edition 7.0.9 - 安装文件步骤中的错误
- typescript - 如何在打字稿量角器中逐行读取csv文件?