package com.zhgd.xmgl.security.entity; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.User; import java.util.Collection; public class UserInfo extends User { private Long userId; public UserInfo(String username, String password, Collection authorities, Long userId) { super(username, password, authorities); this.userId = userId; } public UserInfo(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection authorities, Long userId) { super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities); this.userId = userId; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } }