Can';t让Ehcache与spring3一起工作

Can';t让Ehcache与spring3一起工作,spring,security,ehcache,Spring,Security,Ehcache,我是新来的春天,所以请原谅我,如果我的问题是愚蠢的 我将尝试按照一些示例在SpringWeb应用程序上配置安全性。我已经将其配置为使用ldap目录。现在,我需要向流程中添加缓存,这样就不会在每次请求凭证时都从ldap目录中获取凭证 为此,我添加了cache ref=“userCache”,如教程所示: <authentication-manager> <authentication-provider> ... <ldap-user-servi

我是新来的春天,所以请原谅我,如果我的问题是愚蠢的

我将尝试按照一些示例在SpringWeb应用程序上配置安全性。我已经将其配置为使用ldap目录。现在,我需要向流程中添加缓存,这样就不会在每次请求凭证时都从ldap目录中获取凭证

为此,我添加了
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>
缓存管理器的定义如下:

  <bean id="cacheManager"
   class="org.springframework.security.core.userdetails.cache.EhCacheManagerFactoryBean" />

这种配置的问题是我无法获得JAR,因为它们基于旧版本的Spring2。我使用的缓存管理器

 <bean id="cacheManager"
 class="net.sf.ehcache.CacheManager" />

但是
org.springframework.cache.ehcache.EhCacheFactoryBean
org.springframework.security.providers.dao.cache.EhCacheBasedUserCache
我不知道除了Spring2之外从哪里可以得到它们,如果我把它们添加到我的项目中,它会阻止一切


在这件事上,如果有任何帮助,我将不胜感激。如果您有其他解决方案,请提出一些建议。谢谢

Spring3.0.x中的org.springframework.cache.ehcache.EhCacheFactoryBean位于Spring-context-support-3.0.x.RELEASE.jar中

没有类
org.springframework.security.providers.dao.cache.EhCacheBasedUserCache
,但有类
org.springframework.security.core.userdetails.cache.EhCacheBasedUserCache
位于spring-security-core-3.0.x.RELEASE.jar中

 <bean id="cacheManager"
 class="net.sf.ehcache.CacheManager" />