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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -