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 cachemanagerin order hold of cache instance ehcache.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -