public class CompositeUserRepository extends java.lang.Object implements UserRepository
UserRepository
that compose all UserRepository
s
registered in an application and delegates operations to them.
For methods that return a single result, it returns the result of the first successful method execution by the delegates (the first one that hasn't ended up with an exception). Method returning a collection includes the results obtained from all the delegates.
Modifier and Type | Field and Description |
---|---|
protected java.util.List<UserRepository> |
userRepositories |
Constructor and Description |
---|
CompositeUserRepository() |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.core.userdetails.UserDetails |
getAnonymousUser()
Returns the built-in 'anonymous' user.
|
java.util.List<? extends org.springframework.security.core.userdetails.UserDetails> |
getByUsernameLike(java.lang.String substring)
Returns the list of users whose username contains the given substring.
|
org.springframework.security.core.userdetails.UserDetails |
getSystemUser()
Returns the built-in 'system' user.
|
org.springframework.security.core.userdetails.UserDetails |
loadUserByUsername(java.lang.String username) |
@Autowired protected java.util.List<UserRepository> userRepositories
public org.springframework.security.core.userdetails.UserDetails getSystemUser()
UserRepository
getSystemUser
in interface UserRepository
public org.springframework.security.core.userdetails.UserDetails getAnonymousUser()
UserRepository
getAnonymousUser
in interface UserRepository
public java.util.List<? extends org.springframework.security.core.userdetails.UserDetails> getByUsernameLike(java.lang.String substring)
UserRepository
getByUsernameLike
in interface UserRepository
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(java.lang.String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
loadUserByUsername
in interface org.springframework.security.core.userdetails.UserDetailsService
org.springframework.security.core.userdetails.UsernameNotFoundException