http://www.mkyong.com/spring-security/spring-security-form-login-using-database/
jdbc-user-service参照下面方法写,别用上面文章的
<jdbc-user-service id="userService"
data-source-ref="dataSource"
users-by-username-query=
"select username, password, true from spitter where username=?"
authorities-by-username-query=
"select username,'ROLE_SPITTER' from spitter where username=?" />
本文介绍如何在Spring Security中实现基于数据库的自定义认证服务,通过使用JDBC来验证用户身份并获取角色信息。
5万+

被折叠的 条评论
为什么被折叠?



