懒羊羊
2023-11-14 8286c62256f23bc2367a6729c0f46f84215e380b
提交 | 用户 | 时间
8286c6 1 package cn.stylefeng.guns.sys.core.auth.userdetail;
2
3 import cn.stylefeng.guns.base.auth.model.LoginUser;
4 import cn.stylefeng.guns.base.auth.service.AuthService;
5 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.security.core.userdetails.UserDetailsService;
7 import org.springframework.security.core.userdetails.UsernameNotFoundException;
8 import org.springframework.stereotype.Service;
9
10 /**
11  * 用户详情信息获取
12  *
13  * @author fengshuonan
14  * @Date 2019-09-28 14:07
15  */
16 @Service("jwtUserDetailsService")
17 public class JwtUserDetailsServiceImpl implements UserDetailsService {
18
19     @Autowired
20     private AuthService authService;
21
22     @Override
23     public LoginUser loadUserByUsername(String username) throws UsernameNotFoundException {
24         return authService.user(username);
25     }
26 }