package com.juick.service.security; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; /** * Created by aalexeev on 11/28/16. */ public class NullUserDetailsService implements UserDetailsService { @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { throw new UsernameNotFoundException( "loadUserByUsername called for NullUserDetailsService, user " + username + "can not be found"); } }