Spring 要使用salt源bean,我需要实现哪个域?

Spring 要使用salt源bean,我需要实现哪个域?,spring,spring-security,Spring,Spring Security,我试图在SpringSecurity3中实现一个salt源作为我的安全性的一部分。我想对用户名加盐,但为了如下所示使用它,我需要实现哪个域才能利用spring security的默认实现 <authentication-manager> <authentication-provider user-service-ref="userDetailsService"> <password-encoder hash="sha-256">

我试图在SpringSecurity3中实现一个salt源作为我的安全性的一部分。我想对用户名加盐,但为了如下所示使用它,我需要实现哪个域才能利用spring security的默认实现

<authentication-manager>
    <authentication-provider user-service-ref="userDetailsService">
        <password-encoder hash="sha-256">
            <salt-source user-property="username" />
        </password-encoder>
    </authentication-provider>
</authentication-manager>


我猜在域中,您指的是安全命名空间。Spring安全命名空间配置的位置是:(不要指定要根据最新版本解析的版本)。查看文档:

不,我指的是一个带有getter/setter的类。我需要实现哪个类?如果要创建自己的类,而不是使用Spring的默认类,则必须实现
org.springframework.security.authentication.dao.SaltSource
接口。但这是一个接口,而不是域。