admin 管理员组文章数量: 887031
2023年12月23日发(作者:java数组可以存储不同类型的)
} public void setUsername(String username) { me = username; } public void setPassword(String password) { rd = password; } public Integer getStatus() { return status; } public void setStatus(Integer status) { = status; } public List
public Integer getStatus() { return status; } public void setStatus(Integer status) { = status; } public List
public interface UserMapper { @Select("select * from sys_user where username=#{username}") @Results({ @Result(id = true, property = "id", column = "id"), @Result(property = "roles", column = "id", javaType = , many = @Many(select = "Uid")) }) public SysUser findByUsername(String username);}5. 编写UserDetailService的实现类UserServicepublic interface UserService extends UserDetailsService {}UserServiceImpl@Service@Transactionalpublic class UserServiceImpl implements UserService { @Autowired private UserMapper userMapper; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { return Username(username); }}6. 编写 SpringSecurity配置类
版权声明:本文标题:springboot和springsecurity整合OAuth2 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/jishu/1703308608h446330.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论