java Shiro定制JDBC领域
我正在摆弄Shiro安全框架,并实现一个定制的JDBC领域
我的shiro中当前设置了以下值。ini文件
jdbcRealm.authenticationQuery = SELECT password FROM user WHERE username = ?
我的问题是,如果我扩展了JdbcRealm并覆盖了它的doGetAuthenticationInfo(AuthenticationToken token)方法,那么JdbcRealm就会失效。在myshiro中设置authenticationQuery。ini文件仍被调用?还是方法覆盖优先于shiro中的设置。ini文件
public class CustomJdbcRealm extends JdbcRealm
{
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException
{
// Connect to DB to get password and salt values
}
}
共 (0) 个答案