4
我想在我的web应用程序中使用Spring Security 3.1。我已经开始遵循这个特殊的tutorial。Spring Security自定义用户授权表
我使用这里所使用的技术,其中在身份验证提供者是一个数据源
<authentication-manager>
<authentication-provider>
<jdbc-user-service data-source-ref="dataSource"
users-by-username-query="
select email,password
from usr where email=?"
authorities-by-username-query="
select u.email, ur.authority from usr u, usr_roles ur
where u.usr_id = ur.usr_id and u.email =? "
/>
</authentication-provider>
</authentication-manager>
所以,如果你发现我使用的电子邮件作为我的用户名和我没有启用列。
这似乎不起作用。
我的登录表单看起来像
<form name="f" action="<c:url value="j_spring_security_check" />" method="POST">
<table>
<tr>
<td>User:</td>
<td><input type="text" name="j_username" value=""></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="j_password" />
</td>
</tr>
<tr>
<td colspan="2">
<input name="submit" type="submit" value="submit" />
</td>
</tr>
<tr>
<td colspan="2">
<input name="reset" type="reset" />
</td>
</tr>
</table>
</form>
请告知至于如何得到这个工作,还是我失去了一些东西?