caching - How to configure Spring UserCache with EhCacheBasedUserCache? -
the goal configure spring use usercache
interface retrieving user details cache.
spring configures default
public class daoauthenticationprovider extends abstractuserdetailsauthenticationprovider
when use standard security configuration. nothing exceptional. default cache logic in abstractuserdetailsauthenticationprovider
uses `nullusercache' implementation.
another implementation(wrapper?) interface provided is: org.springframework.security.core.userdetails.cache.ehcachebasedusercache
with setter setcache(ehcache ehcache)
questions:
a. how configure ehcache instance, need full blown cache manager scenario?
b. how override spring default bean(daoauthenticationprovider) ? declare own same name , set cache on or autowire , set cache on it?
with regards point a, yes need cachemanager
in order hold of cache
instance ehcache.
Comments
Post a Comment