All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.shawven.security.authorization.DefaultUserDetailService Maven / Gradle / Ivy

The newest version!
package com.github.shawven.security.authorization;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * @author Shoven
 * @date 2019-10-28
 */
public class DefaultUserDetailService implements UserDetailsService {

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        logger.warn("请配置 UserDetailsService 接口的实现.");
        throw new UsernameNotFoundException(username);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy