Spring security SpringSecurity4EHCacheJava配置
我已经通过数据库身份验证和ldap身份验证成功地实现了SpringSecurity4.0.1。所有配置都是通过Java配置完成的 为了使SpringSecurity能够为RESTAPI缓存用户,特别是在使用ldap身份验证时,我想将SpringSecurity配置为使用已经配置的EhCache 现在谈谈主要问题。我看到了XML配置的功能,它告诉框架实际使用带有Spring security SpringSecurity4EHCacheJava配置,spring-security,ehcache,spring-java-config,spring-security-ldap,Spring Security,Ehcache,Spring Java Config,Spring Security Ldap,我已经通过数据库身份验证和ldap身份验证成功地实现了SpringSecurity4.0.1。所有配置都是通过Java配置完成的 为了使SpringSecurity能够为RESTAPI缓存用户,特别是在使用ldap身份验证时,我想将SpringSecurity配置为使用已经配置的EhCache 现在谈谈主要问题。我看到了XML配置的功能,它告诉框架实际使用带有cache ref=“userCache”的缓存,如下所示: <authentication-manager> <
cache ref=“userCache”
的缓存,如下所示:
<authentication-manager>
<authentication-provider>
...
<ldap-user-service server-ref="ldapServer"
user-search-filter="uid={0}" user-search-base="ou=people"
group-search-filter="member={0}" group-search-base="ou=groups"
cache-ref="userCache" />
</authentication-provider>
</authentication-manager>
...
现在我想问的是,如何使用Java config配置cache ref
?我试图在相应的Java类中为这个类找到一个setter,但什么也找不到
如果有人能帮我就好了
谢谢